Earlier quoted context omitted.
Decades ols books in C most certainly is even useful in modern C++23 because you need to interact with other libraries written in C89. When a lot of modern CS concepts wwre first discovered and studied in the 70s, there's no point arguing that old books are useless. Honestly there may be sections of old books that are useless but in the whole they are still useful.
We're talking about learning C/C++ from scratch which makes no sense to do by using a decades old book because it wouldn't teach you any modern features. Also we're not talking about computer science.
Rust to C compiler – 95.9% test pass rate, odd platforms
211–220 of 264 posts
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#212Earlier quoted context omitted.
My copy of The C++ Programming Language for C++98 is still useful today, as is copy of The C Programming Language for C89. The idea that these books are no longer useful is absurd. Modern compilers still support those versions and the new versions are largely extensions of the old (although C++11 changed some standard library definitions). The only way you could think this is if you have zero knowledge of these langu…
> The only way you could think this is if you have zero knowledge of these languages. Exactly. For context see my original comment above about C/C++ books being paid.
There are so many free learning resources for these languages that it is ridiculous to say that you need books to learn them. The books are great, but non-essential. If you insist on reading books, there is an ancient invention called a library that you can use for free.
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#213Earlier quoted context omitted.
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?
I know a guy who used to love Rust and his cannot stand it. The hype wore off in his case.
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#214Earlier quoted context omitted.
https://endoflife.date/rust
Are you asking for LTS releases? https://ferrocene.dev/en/
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#215Earlier quoted context omitted.
Not true on RISC-V. That's full of undefined behaviour. But anyway this is kind of off-topic. I think OutOfHere was imagining that this somehow skips the type checking and borrow checking steps which of course it doesn't.
What's all that undefined behavior? Closest I can think of is executing unsupported instructions, but you have to mess up pretty hard for that to happen, and you're not gonna get predictable behavior here anyway (and sane hardware will trap of course; and executing random memory as instructions is effectively UB on any architecture). (there's a good bit of unpredictable behavior (RVV tail-agnostic elements, specific…
There's loads more though. Just search for "reserved" in the ISA manual.
Of course a Rust to C compiler is not going to hit any of these. I was just pointing them out.
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#216Earlier quoted context omitted.
What's all that undefined behavior? Closest I can think of is executing unsupported instructions, but you have to mess up pretty hard for that to happen, and you're not gonna get predictable behavior here anyway (and sane hardware will trap of course; and executing random memory as instructions is effectively UB on any architecture). (there's a good bit of unpredictable behavior (RVV tail-agnostic elements, specific…
Accessing non-existent CSRs is another big one, which also means you can't probe for features. There's loads more though. Just search for "reserved" in the ISA manual. Of course a Rust to C compiler is not going to hit any of these. I was just pointing them out.
But yeah, no try-running-potentially-unsupported-things-to-discover-what-is-supported; essentially a necessary property for an open ISA as there's nothing preventing a vendor from adding random custom garbage in encoding space they don't use.
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#217I am still waiting for any of the alternative Rust front- or backends to allow me to bootstrap Rust on alpha, hppa, m68k and sh4 which are still lacking Rust support. Originally, the rustc_codegen_gcc project made this promise but never fulfilled it.
> to allow me to bootstrap Rust on alpha, hppa, m68k and sh4 Do you actually use all four of those platforms, or is this an arbitrary threshold for what you consider a complete set of platform support?
Plus, there is a very vibrant community around the Motorola 68000 and SuperH CPUs thanks to the Amiga, Sega Dreamcast and many other classical computer systems and consoles.
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#218Earlier quoted context omitted.
They're still common (except for alpha) platforms in some market segment specific corners of embedded development. So, maybe for those purposes? Though, the trend I'm seeing a lot of is greenfield projects just migrating their MCUs to ARM.
> 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…
Yes, retro-computing is a thing. Wouldn't it be nice to have Rust support on these platforms as well?
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#219I am still waiting for any of the alternative Rust front- or backends to allow me to bootstrap Rust on alpha, hppa, m68k and sh4 which are still lacking Rust support. Originally, the rustc_codegen_gcc project made this promise but never fulfilled it.
"m68k-unknown-linux-gnu" was merged as a Tier-3 target for Rust, wasn't it? [0] [0] https://github.com/rust-lang/compiler-team/issues/458
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#220I am still waiting for any of the alternative Rust front- or backends to allow me to bootstrap Rust on alpha, hppa, m68k and sh4 which are still lacking Rust support. Originally, the rustc_codegen_gcc project made this promise but never fulfilled it.
Did they abandon that goal? Last I heard it was still under development.
But it turns out that rustc_codegen_gcc still hasn't delivered and it seems the project has fallen asleep.