[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor acceptance emails will be sent out over the coming weeks. Make sure to check your spam folder!


[Advertise on 4chan]


File: IMG_1750.png (50 KB, 709x438)
50 KB PNG
Purpose of C and C++ when you have portable Rust?

>Don’t need to mess with syscalls in C anymore
>Don’t need C++ STD
>>
>c performance
>>
>>109076098
lol the mascot is a tranny crab
>>
File: fries.gif (1.83 MB, 498x498)
1.83 MB GIF
>>109076098
I already have a package manager, portage came for free with my gentoo install.
>>
>>109076098
i will literally never use rust lol
>>
>>109076098
>Purpose of C and C++ when you have portable Rust?
100's of millions of lines of legacy code.
beyond that (which is admittedly not a small matter), and some small scale hobbyist endeavors, almost no one wants to use C++ in new greenfield projects. same goes for C, except for a specific field or two.
but you will have droves of /g/eet totally-not-filtered-real-coders arguing otherwise. and no, you can't see any of their work. but it totally exists..totally lol
>>
>>109076098
Holy C for me
>>
File: rust logo.png (194 KB, 1055x607)
194 KB PNG
>>109076098
>Rust
picrel

and last time I checked, as long as they keep using a npm-style package mgr, rust will be infested with backdoors.
>>
>>109076098
The "portability" of Rust that you are bragging about is just "having libraries". C and C++ have libraries too. Some of which are actually wrappers around C libraries.
>>
>>109081061
>good well thought std
>wrappers for syscalls across windows/unix/linux
>crates where the equivalent in c++ or c would be hell to maintain in Cmake or MSVC
What else do you need? Learn Rust.
>>
>>109076098
Rust is ugly as fuck.
It is as ugly as C++ on it's worst, but you can't write code as clean as C++ on it's best.
>>
File: rust.png (100 KB, 627x722)
100 KB PNG
>>109081192
all those crates are full of unsafe {} blocks and will eventually explode
>>
File: rust 1758716084496412.png (292 KB, 1552x479)
292 KB PNG
>>109081254
>Rust is ugly as fuck.
picrel
>>
>>109076098
the thing is that unsafe rust is way harder than C.
its also hard to do some low level optimization tricks on it, SWAR for example.

if rust is so good then why is "extern C" still a thing on it?
>>
>>109076098
lol
lmao even
muh sides... orbit
>>
damn, i missed watching and laughing at the droves of jeets who come to seethe about rust immediately after waking up. you can even predict their time of arrival with high accuracy.
thank you tards.
>>
>>109081362
>why is "extern C"
Because they stole an entire C++ compiler, and fucked with it until it was Rust, preserving the worst things about C++ and then enhancing them so it was unbearable.
>>
>>109081270
It's likely that all the .unwrap() that panic will blow-up first. And do.
That's how you know it's gone nowhere.
>>
>>109077488
>100's of millions of lines of legacy code
More fodder for my c2rust transliterator sir! What's yours is mine! Code harder: you work for me and glory be to Rust.
>>
>>109081572
doesn't work with seepeepee, you will need to "vibe" with that crap.
also notice how `&raw` didn't reach jeet land yet. they are still doing "unsafe rust is harder than c saar" above. maybe it's old "training data" lol
>>
>>109081277
Trans people live rent free in your head :3
>>
rust have almost zero support compared to c and c++ in embedded
>>
>>109082127
>embedded means the 30 year old arduino board we used in my jeet class
>>
>>109082255
the last time i checked you could only do bare metal on esp32 with rust idk if it supports idf now and to what extent. I almost never get memory leaks doe so I dont think it will improve my experience, on yhe contrary it would make it unorthodox. I'm open to try it out if you can tell me the difference
>>
>>109081362
>Why extern C still a thing on it
I dislike rust as much as the next guy, but this is a disingenuous argument. C is the linga franca of programming. If you want to interopt with other languages you have to do it from C. Rust would have to become more prevalent then C before you could remove that.
>>
>>109076098
Try asking someone outside of your little internet echo chamber.
>>
>can't into Harvard machines
>can't into 16-bit
>can't into segmented memory
>can't into non-octet byte machines
There are billions of the above machines in use and Rust can't touch them because it's only specified for 32 and 64-bit Von Neumann machines.
>>
>>109077488
modern runtimes are built with C:

https://github.com/bellard/mquickjs (created 6 months ago)

https://codeberg.org/determin1st/php-sm-test (created few days ago)

clang can be dropped into any linux distro and will run from that directory - ultimate portability. can you do it with rust compiler?
>>
>>109081277
Providen an alternative syntax to do picrel
>>
>>109083177
>clang can be dropped into any linux distro and will run from that directory - ultimate portability. can you do it with rust compiler?
With Cmake? How would it run in any dir?
>>
>>109082314
esp32 is well supported and widely used with embassy from what i hear. but when you hear a tard saying "embedded" is C/C++ only", it's safe to assume what's being referenced is an ancient a-level-above-microcontroller crap that actually doesn't even support C or C++, but come with a single custom compiler that supports a look-alike small subset.
>>
>>109083177
you just posted two hobbyist toys. that's more of a proof that what was stated is true.

and the first is re-using quickjs which is neither new nor serious, but still admittedly can be useful and serviceable for some use-cases (all "independent" JS implementations, including quickjs and multiple rust-based ones have real-world benchmarks where they are many many many times slower than V8).
not sure what you're referring to re clang, and you don't sound very clued with that one.
>>
can rustc or any rust compiler bootstrap itself now? where the compiler is written on rust itself?



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.