[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / 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 application acceptance emails are being sent out. Please remember to check your spam box!


[Advertise on 4chan]


File: over.png (504 KB, 1184x653)
504 KB
504 KB PNG
Is there any point to rust when garbage collected C and soon garbage collected C++ exists?
>>
No
>>
>MISRA C
>SPARK
you do not need rust
>>
>>107269245
can someone explain the point of fil-c to me? is it supposed to be a replacement c compiler that you just use at all times and eat the memory/performance cost or is it something you just run for early production to find memory bugs during runtime and then switch to a regular compiler?
>>
>>107269368
You can do both. If you don't need ALL the performance of C, you can ship the fil-C build, it'll be possibly slower than a normal C program, but also as safe as an higher-level garbage collected language.

If you need performance, you can build with fil-C in your debug builds and in CI runs, and ship the gcc/clang build. In this case it acts as a valgrind/fsanitize replacement, but possibly faster(?)
>>
>>107269368
The purpose of eating off the ground is to be a replacement for the grapes you cannot intellectually reach, and you are sure they are sour anyway
>>
>>107269368
It's not to find memory bugs, asan/valgrind/etc exist for that. You are supposed to use it for real software that you release. Its optimized better for running than asan/valgrind/etc is while also being safer.
>>
>Garbage Collected C
>>
>>107269245
writing C/C++ sucks once you tried Rust. There is just a lot of better design decisions they learned from all the mistakes C and co. did. Thats not to say C is a bad language just not as expressive I would argue.
>>
>>107269245
>what if we were to defeat the whole purpose of C by tanking its performance with garbage collection
You get Python.
>>
>>107273017
>writing C/C++ sucks once you tried Rust.
can confirm. there are very few niche things you can do in C++ you can't do in Rust, but the practical reality is it doesn't matter.
>>
>>107273017
express this you, filthy casual
>inb4 muh intrinsics
theres more going on than meets the eye.
the code is (slightly) optimized towards instruction level parallelism and out of order operations
you cant do that in rust bc everything is ab stracted away.
MAAAAYBE if you write "c in rust" you could attempt to ado something of the sort
but that completely defeats the purpose of using rust to begin with
>>
>>107273064
>express this you, filthy casual
>atoi
>period
>decimal
wtf?

either way, in Rust this is just:

>> "1234.4324".parse::<f64>()
Ok(1234.4324)
>>
>>107273064
maybe if you didn't post a blurry screenshot I could
>>
File: i-C-is.jpg (73 KB, 650x375)
73 KB
73 KB JPG
>>107273075
kek. no.
heres the full code if you wanna run benchmarks
https://files.catbox.moe/1zq8zw.c
>inb4 you cheat
ofc i do. thats why i use C(tm)
>>
File: anakin-econmics.png (678 KB, 800x804)
678 KB
678 KB PNG
>>107273106
>>107273119
hf
make sure to post the equivalent in rust so we can have a look
>>
>>107273119
>>107273129
also sorry in advance for being a filthy pig but it is what it is. its a working version, with even a crucial part of the code deactivated for debugging purposes
you need -mavx2 and -mbmi in your compiler flags to compile it
>>
>>107273119
>>107273129
>>107273142
schizo retard reply got one shotted with one line of code and starts schizoing out. what is this mental illness called?
>>
>>107273177
you got your share of attention
now go back to your legos, the grown ups are talking
>>
>>107273057
And then you want some performance back, so you write a bunch of C libraries for it.
>>
File: doom-C-layer.png (1.29 MB, 1280x720)
1.29 MB
1.29 MB PNG
up btw
i still wait for the translation of this code into the oh so expressive rust

given theres no reply
i take it that its another instance where C btfoes rust
without survivors whatsoever
total trainwreck, dont bother first responders kind of disaster
heres the code if you wanna take a jab at this
but at least you could have said
->ok, u won
>>107273119


admitting defeat is class.
recognize your limitations, be proud when you win,
do better when you lose
>>
>>107269245
Rust is not garbage collected, and garbage collected C would delete itself.
>>
>Garbage Collected C

Hopefully it collects itself
>>
>>107269531
You're wrong but undebatable. I believe your argument stems from the mortal sin of pride.
>>
>>107273064
Normal people
>+
>-
>>
Cniles
>vector_atouf_maths_128_hadd_float
>_mm256_sub_epi8
>_mm256_cmpgt_epi8
>>
>>107269245
Literally yesterday /g/ was saying that it's unacceptable that cloudflare's rust program crashed when finding itself in an invalid state. And today's story is that you don't really need compile time zero cost memory safety, because you can just add on a pile of code that significantly slows down your program and CRASHES THE WHOLE PROGRAM if it detects a memory safety violation.
Lmao! They really aren't sending their best. Looking forward to tomorrow's cope.
>>
>>107275568
i would have done everything in paiton if i could
i work on the same project since three years, so i ended up learning stuff

its numbercrunching, outside of the maths that are usually used.
i really cannot "just use pytorch" and call it a day...
>>
>still nothing
>big silence
yea.
and im not even the final boss
im actually the tutorial. theres subtelties i dont master yet
and you cant compete even with this
>>
>>107269245
>oh, you dropped some packet on my queue
>brb, just collecting my garbage
>..... rx_missed_error
>I'm back, all cleaned up! Anon?
>...
>Anon?
>>
>>107275398
It absolutely is, rustrannies are just in denial about it because rust's gc is so embarrassingly terrible.
>>
>>107277806
Is it the case that you don't know how rust lifetimes work or that you don't know what a garbage collector is?
>>
File: fil-bro.png (1.17 MB, 3195x1754)
1.17 MB
1.17 MB PNG
>>
>>107277837
It is the case that I do know what a garbage collector is and you manifestly don't.
>>
>>107269245
>fil-CRASHES
>10x slower
Literally why.



[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.