RUSTFAGS BTFO
youtube.com
RUSTFAGS BTFO
Other urls found in this thread:
github.com
youtu.be
twitter.com
how do you even write an os with rust?
does it compile to machine code w/o anything else linked to?
In order to compile an OS written in Rust, you have to add "freestanding" compilation/linking option to not allow it to get linked with system's libraries. Also, in many cases you have to disable language's security measures, degrading it to security level of C. So, in the end, it doesn't matter.
> This interview is from 2012! Rust didn't exist at that time
there you go
but how do they do multithread w/o system libraries?
They can't use multithreading until they write their own implementation - as simple as that. They have to disable most Rust features, making it work like C with Rust syntax.
> like C with Rust syntax.
So already an improvement.
What's in your opinion the most important advantage of Rust syntax over C/C++ syntax?
things that are awful in C:
>integer promotion rules
>errno
>globally namespaced and weakly types enums
>bitflags
>arrays vs pointers
>includes as a compilation unit dependency primitive
>type and declaration syntax
so nothing really critical
Theo BTFOs rust tranny (35:55)
Now Linus does it too
C STRONG, friendly reminder that hispers dislike memory management
Hey hey hey Cniles!
int x;
printf("%d %d\n" ,foo(&x), foo(&x));
How does it feel to know that this is 200% UB and the compiler will never warn you about this?
People posting this footage doesn't seem to capable of basic analysis and critical thinking.
I'm not retarded so this is not a problem
I CAN'T TAKE IT ANYMORE LADS WHY DO THEY KEEP BULLYING C THEY HAVE NO IDEA WHAT AN SIMPLE ELEGANT LANGUAGE IS C GIVES YOU TREMENDOUS POWER OVER YOUR MACHINE IT ACHIEVES LITERALLY TEN THOUSAND BILLION TIMES THE PERFORMANCE OF ALL OF THESE STUPID TRANNY RETARD LANGUAGES LIKE THIS RUST THING HOLY SHIT THESE TRANNY FUCKS THINK THEY'RE THE SHIT WELL GUESS WHAT FAGGOTS I CAN USE POINTERS FOR MY FIZZBUZZ AND YOU CAN'T BECAUSE YOUR BORROW CHECKER PREVENTS ANYTHING PAST AN EMPTY PROGRAM HAHAHA HOW DO YOU FEEL NOW RUSTARDS THANKS TO C I CAN USE THE POWER OF VOID POINTERS AND MEMCPY TO ACHIEVE PEAK PERFORMANCE AND DON'T YOU DARE TELL ME MY SHIT SEGFAULTS CAUSE IT'S WRONG I'M THE BEST PROGRAMMER ON EARTH AND THAT'S BECAUSE I DON'T USE ANY NOOBY CONTAINER LIBRARY LIKE THIS C++ ABOMINATION PROVIDES YOU WITH I REIMPLEMENT LINKED LISTS AND BINARY TREES EVERY TIME I USE THEM THAT WAY I KNOW HOW A COMPUTER *REALLY* WORKS ALSO RAII ISN'T USEFUL FUCK YOU OOPAJEETS MALLOC AND FREE IS THE WAY IT'S MEANT TO BE PROGRAMMED AND IT TELLS ME EVEN MORE HOW COMPUTERS *REALLY* WORK AND MY INTIMMATE KNOWLEDGE OF LINKED LISTS MEANS I NEVER HAVE MEMORY LEAKS WHAT ARE YOU SAYING YOU DUMB BITCH MOTHERFUCKER C HAS NO ATOMICS WELL FUCK YOU BLAME LINUX EVERYBODY KNOWS ATOMICS ARE PROVIDED BY THE OS AND NOT THE HARDWARE BUT FUCK YOU C RULES AND IS EXTREMELY SAFE ANE ANYBODY SAYING OTHERWISE IS A RETARD WHO PROBABLY REWRITES STUFF IN RUST INSTEAD OF MAKING LIBC-LESS HELLO WORLDS LIKE I DID LAST NIGHT HOLY SHIT AND YOU'RE SUCH A BRAINLET FOR NEEDING THOSE NOOBY MODULES WHAT I DO IS USE HEADER FILES THAT WAY I EITHER HAVE TO DO METAPROGRAMMING TO PREVEND MULTIPLE INCLUSIONS OR MEGA-ENGINEER MY INCLUSION TREE LIKE THEY DO IN THE PLAN 9 LIBC THAT'S PEAK IQ KIDDO
BLOOD FOR THE MALLOC GOD
Abstractions make your programs slowe-
what the fuck
This is why you should code in asm
>i haven't seen one in memory-safe languages
ripgreg
>THERE'S NO UNIX UTILITIES IN RUST!
>>ripgrep
>WELL, WELL UH, WELL THEY DIDN'T REPLACE UNIX YET!!!!
Yet. Fucking toddlers.
>x86 asm
*vomit*
this sense make little. something fishy going on
I actually compiled it myself and checked with objdump
>it's actually true
BASED ASM! C,C++ AND RUSTFAGS BTFO!
You're retarded. Ripgrep isn't "grep", it's its own implementation which is incompatible with POSIX.
HAHAHA IT'S ACTUALLY SLOWER IN C++ WITH EVERY OPTIMIZATION FLAG
CPPFAGS B T F O
What is this perfectly-normal-and-natural-so-you-should-pay-taxes-to-fund-its-wedding shell?
Is &x really undefined? Seems like it would have a defined adress.
Now make the array contents not known at compile time. Not trying to be clever with the loop might also help the compiler optimize it better.
What? This isn't UB...
default gnome-terminal
default oh-my-zsh
int f(int *const x)
{
return ++*x;
}
That's not UB either... You are just incrementing the value pointed to by x, which is a constant pointer to int.
You're acting retarded on purpose, huh?
#include
#include
static int
foo(int *const x)
{
return ++*x;
}
int
main(void)
{
int x = 0;
printf("%d %d\n", foo(&x), foo(&x));
return EXIT_SUCCESS;
}
$ cc -std=c99 -pedantic -Wall -Wextra -O3 -o ubnowarngcc ubnowarn.c
$ ./ubnowarngcc
2 1
$ clang -std=c99 -pedantic -Wall -Wextra -o ubnowarnclang ubnowarn.c
$ ./ubnowarnclang
1 2
Neither put any warning. And the function isn't even hidden in another translation unit.
The order of evaluation of function parameters isn't defined. As you see one compiler chooses to do it let to right, another right to left. Don't blame the language for your inability to read
>"HURR DURR THAT'S NOT UB"
>prove it's UB
>"HURR DURR THAT'S UB DON'T BLAME THE LANGUAGE FOR YOUR INABILITY TO READ"
You're acting retarded on purpose, huh?
You're a special kind of a retard. The language clearly defines the evaluation of function arguments to be implementation defined. It is NOT undefined behaviour.
It is unethical to continue writing code in non-memory-safe C or C-based languages, for any purpose. Period.
>the language explicitely doesn't define the behaviour, therefore it's not undefined behaviour
How long am I going to wait for that "HAHAHA JOKES ON U I WUZ ONLY PRETENDING"?
>O3 and O1
Yes. O1 C++ is faster than O3 C.
>adopts tranny coc
opinion discarded
C is security vulnerabilities as a language.
The difference between undefined and implementation defined isn't worth much. No one should be relying on either.
They are technically different. The value of 'sizeof(int)' is an example of implementation defined behavior.
-fno-tree-vectorize
You are actually retard
And these "people" aren't programmers
constexpr
None
C's syntax is the gold standard
>The value of 'sizeof(int)' is an example of implementation defined behavior.
Which means a lot of code that depends on it is UB hence why Rust is right to provide only fixed-size integer types.
I have some rust code that runs entirely on microcontroller. Also there's a UEFI target so you can build a bootable OS for x86_64. Basically, it works the same as C on bare metal - you statically link a special executable, possibly with a custom linker script. You only get libcore and not libstd, but that's about the same as C. The UEFI target sets up the linker script for you, but you can also do it yourself.
Excuse me gentlemen. There's something I would like to say.
*ahem*
fn main() {
unsafe { *std::ptr::null_mut::() = 0; }
}
Rust was around in 2010 m8
>constexpr