If you rustfags want to replace C so hard, then why havem't you written a compiler from binary yet?

If you rustfags want to replace C so hard, then why havem't you written a compiler from binary yet?

>this is what C-ucks consider decent b8

desu we just want the world to be a little memory-safer than we left it.

MEMORY
E
M
O
R
Y

> Memory-safer by destroying everything else and rebuilding all over again from scratch because muuh static analysis XDDD

kys

Serious question though,

If it's all about compile time analysis, why not just improve the C compiler or something?

Is there some fundamental technical challenge to this? I mean, maybe there could be some optional (for backwards compatibility) keywords to add so we can get the same thing.

I don't really know C++, but I've seen some people talking about atomic or something. Why can't C have a compile time thing like that?

Need a bigger b8, C toddler. Fuck off.

>If it's all about compile time analysis
It's not. Does C even have lifetimes and borrow system?

WHAT IS SELF-HOSTING TOOLCHAIN

seriously what the fuck op google it

Until you fuck up your compiler. This is why CHERI is being done. Please support that kinda shit for your compiler and in your compiler

In a word, because that would no longer be C, so why not go the whole way and also improve the language without being tied to legacy bullshit? C says program X is valid. The analysis says program X SHOULDN'T be valid because it has bugs. Refusing the program would no longer be C. Accepting the program would change nothing over C.

Cool, is this the script you used?
echo -e "WHAT IS\n$(cat /usr/share/dict/cracklib-small | awk "NR==$(echo $(echo $RANDOM \* $(wc -l /usr/share/dict/cracklib-small | awk '{ print $1; }') / 32767 | bc -l) | sed -e 's/\(.*\)\..*/\1/')" | tr '[:lower:]' '[:upper:]')\n\nseriously what the fuck op google it"

>Is there some fundamental technical challenge to this? I mean, maybe there could be some optional (for backwards compatibility) keywords to add so we can get the same thing.
Backwards compatibility IS the whole challenge.

A "safer C dialect" already exists. It was called Cyclone. It tried very hard to be a drop-in C replacement, but it failed anyway. Nobody used it and its creators abandoned it. Please go ahead and repeat their mistakes if you think you're smarter than them.

Cyclone was great, and it's a clear inspiration of Rust's, along with Ada.

But you're right, for all the shit people give the Rust compiler over how overly protective it is, it's much more suited to you understanding what the hell is going on than Cyclone ever was, and that's mostly because the language is designed around the idea of lifetimes and borrowing.

Ada's still pretty good these days, but it's missing quite a lot of features and can't do the fast low level shit that C can, unlike Rust.

Also doesn't ada only support either manual memory management or GC?

Ada is still able to express some things that Rust currently can't. Numeric dependent types might change this.

GC was always considered an optional feature, and none of the major implementations included it.

Interesting, it seems to depend on the implementation. I'd would have guessed that this is something set in the standard and/or at language level, but according to SO that doesn't seem to be the case. Weird.

Then again, in case somebody uses Ada they probably know what they are doing, so the standard isn't the only line of defense.

As far as I know the most recent version of the standard states the GC must be provided by the implementation but must not(?) be enabled by default.

>Ada is still able to express some things that Rust currently can't.
Yep, and hopefully that won't last, but Ada has a suprisingly huge backing from the computer scientist community in addition to military applications (where it's slowly getting replaced by C++ from what I hear).

If all goes well, Rust can be an Ada that can also be a C if you need it to. But whatever happens it seems we live in times where memory safety (and safety in general) is a very real concern and people beyond state actors will want to run code that's provably safe.

I used to think that Haskell and other pure functional languages might see the light of day because of those security issues, but static analysis might be the way to go here.

So, it's some inane feature that's going to be ignored, like in most C++ compilers?

Anyway, Adacore wanting to rake in mad cash with GNAT explains why GCC has an Ada compiler and LLVM has not, except for DragonEgg, which appears to be semi-dead.

How comes GCC has a frontend for FORTRAN?

Haskell is a miracle of static analysis in its own way, but at the same time it has its own stupid problems. The default behavior of the language, ie. the stuff it falls back on when the optimizer fails, prevents it from ever being used where C is king.

Anyone have any speed comparisons of rust vs c on 8 bit microcontrollers

RMS and friends wanted to have a free compiler for most languages around really bad.

There just isn't the same demand for a new Ada compiler now.

Does LLVM have backends for 8-bit microcontrollers? Last I checked, it didn't.

there's compilers for 8 bit PIC and Atmel

If your compiler doesn't pass certification, you're not legally allowed to use the name Ada.

In practice, C and Asm just dominates the 8 bit mc game with tons of custom proprietary things in the way of a competitor.

I've looked around for benchmarks, but nobody seems to have dedicated the hardware and time to it.

Yea I could not find anything.
The compiler is all that really matters right?

Sadly no.
If you want to do things in a productive manner with those MCs, you either need to use the provided libs or the direct memory interfaces.

In practice you could probably use Rust's easy interfacing with C libraries, but I haven't tried it so there might be pitfalls unknown to me.

In theory, if you can produce a binary and read the documentation for your specific arch, you can do anything.

Eat your own dog food. Write the compiler in the target language

That's not a word, nigga, that's a short paragraph.