← Home ← Back to /g/

Thread 106511980

25 posts 8 images /g/
Anonymous No.106511980 >>106512046 >>106512077 >>106512099 >>106512214 >>106512342 >>106513111 >>106513257
Why are you still using C++ instead of Rust ?
>Memory safety without garbage collection
>Readable and modern syntax
>Encourages good programming habits
>Immutable by default
>Doesn't compromise on performance
Anonymous No.106512046
>>106511980 (OP)
>Hormone replacement therapy
>Gender reassignment surgery
Anonymous No.106512069 >>106512166
I haven't written a single C++ line since I learned Rust.
Anonymous No.106512077
>>106511980 (OP)
>readable
kek
Anonymous No.106512099 >>106512817 >>106512825
>>106511980 (OP)
I can tell that literally everyone using Rust has a macbook with something like 2TB of storage
Cargo generates a huge target folder and it is just not usable on my machine with 256GB storage, 240GB of which is already full.
Especially for me, because I have many small projects instead of one big project. It is virtually impossible to have a rust project that is less than 1GB when you du -sh dir_name

Meanwhile C, Zig, Odin use dynamic linking so you only install dependency once (and it is also smaller), and Go uses caching so that one dependency is reusable between multiple projects.
Anonymous No.106512166 >>106512334 >>106512388
>>106512069
You haven't wrote one before either.
Anonymous No.106512214 >>106512264
>>106511980 (OP)
Man I'm just so tired of C++/Rust threads shitting up the board. Show your github OP so we can see all your marvelous Rust creations. Sage'd.
Anonymous No.106512264
>>106512214
I think it's just a small team of transsexuals (possibly janitors spoofing traffic) with zero board specific interests making the rounds with a checklist of how to troll xyz blue board that post half the shit on the whole website.
Anonymous No.106512334
>>106512166
You can't know that.
It's kind of funny to use that image while also trying to delude yourself about the reality just because it doesn't fit your narrative.

Yeah, I have been writing C++ for about 5-7 before I learned Rust. I even saved my allowance in middle school just to buy a C++ programming book to learn it.
Anonymous No.106512342
>>106511980 (OP)
>crap-plus-plus
>young gen-x doo-doo-pee "programmers"
>basically pascal, but for those, who eat a vegan quiche
>*sip*
and that's just sepples, don't get me started on the tranny
Anonymous No.106512388
>>106512166
good for you. i had to contribute a patch to a major C++ project in the last few days. fortunately, the relevant part of the code base was C-like and interfacing with C libraries, so my disgust was manageable.
Anonymous No.106512817 >>106512859
>>106512099
>It is virtually impossible to have a rust project that is less than 1GB when you du -sh dir_name
Entirely depends on what you are doing.
My current embedded project is just a little over 100MB of audio/video/image assets + whatever these assets contribute to target folder + drivers for everything + Lua virtual machine.
If I were to use C++ like I did before, just IDF source alone would add half a GB to project size. This, along with Rtos would blow up project size just like they blow up output binary size. There would be no chances of fitting in 1GB even if I just used C++ alone.

>Meanwhile C, Zig, Odin use dynamic linking so you only install dependency once (and it is also smaller), and Go uses caching so that one dependency is reusable between multiple projects.
This only works if you are making user space programs. If you are doing actual systems programming you very often cannot rely on dynamic linking.
And if you are making user space programs on very space constrained setting, you can configure Rust to use dynamic linking too.
Anonymous No.106512825 >>106512859 >>106513134
>>106512099
>It is virtually impossible to have a rust project that is less than 1GB when you du -sh dir_name
Entirely depends on what you are doing.
My current embedded project is just a little over 1GB, including 100MB of audio/video/image assets + whatever these assets contribute to target folder + drivers for everything + Lua virtual machine.
If I were to use C++ like I did before, just IDF source alone would add half a GB to project size. This, along with Rtos would blow up project size just like they blow up output binary size. There would be no chances of fitting in 1GB even if I just used C++ alone.

>Meanwhile C, Zig, Odin use dynamic linking so you only install dependency once (and it is also smaller), and Go uses caching so that one dependency is reusable between multiple projects.
This only works if you are making user space programs. If you are doing actual systems programming you very often cannot rely on dynamic linking.
And if you are making user space programs on very space constrained setting, you can configure Rust to use dynamic linking too.
Anonymous No.106512859 >>106512947
>>106512817
>>106512825
>deleted his post to change 100MB to 1GB
holy fucking kek, at least you're honest. 1GB is embarrassing for embedded, and lol at bringing up the Lua VM as if it isn't 100kb
Anonymous No.106512947 >>106513066
>>106512859
>deleted his post to change 100MB to 1GB
>holy fucking kek
I was moving the text around and forgot to put "1GB, including " between "over" and "100MB". The "100MB of ... assets" is still present in both versions.

>and lol at bringing up the Lua VM as if it isn't 100kb
Official user space lua vm implementation is:
$ du -shc lua-5.4.8/src
980K lua-5.4.8/src


>1GB is embarrassing for embedded
Like I said, C++'s esp-idf source code alone is like half of this. This is not a big number by any means when you do not have an OS to rely on and have to set up everything from scratch on bare metal.


But alright, despite your posting style I will assume you actually know what you are talking about and aren't just trying to argue in dishonest manner in order to push a certain narrative.
Let's see your embedded project and its size.
Anonymous No.106513028
I'm too lazy to learn a new langugage.
Anonymous No.106513066 >>106513088
>>106512947
>Official user space lua vm implementation
>posts size of the entire Lua repo
you're an incredibly stupid midwit
Anonymous No.106513088 >>106513100
>>106513066
>posts size of the entire Lua repo
$ ls lua-5.4.8/src
lapi.c lcode.c ldblib.c ldump.c linit.c llimits.h lobject.c loslib.c lstate.h ltable.h luac.c lundump.c lzio.c
lapi.h lcode.h ldebug.c lfunc.c liolib.c lmathlib.c lobject.h lparser.c lstring.c ltablib.c luaconf.h lundump.h lzio.h
lauxlib.c lcorolib.c ldebug.h lfunc.h ljumptab.h lmem.c lopcodes.c lparser.h lstring.h ltm.c lua.h lutf8lib.c Makefile
lauxlib.h lctype.c ldo.c lgc.c llex.c lmem.h lopcodes.h lprefix.h lstrlib.c ltm.h lua.hpp lvm.c
lbaselib.c lctype.h ldo.h lgc.h llex.h loadlib.c lopnames.h lstate.c ltable.c lua.c lualib.h lvm.h

It's not entire repo, it's just the source code.
I also couldn't find their repo, I just downloaded source code bundle from https://www.lua.org

>you're an incredibly stupid midwit
Why are you getting emotional?
We are just discussing programming, there is nothing to get upset over.
Anonymous No.106513100 >>106513132
>>106513088
Didn't know shit like lutf8lib were part of the VM
Anonymous No.106513111
>>106511980 (OP)
Literally all those claims are wrong
You also deny the Y chromsome in all your cells
Weird!
Anonymous No.106513132
>>106513100
Part of stdlib since 5.3
Anonymous No.106513134 >>106513149
>>106512825
Systems programming includes userspace programs, such as GNU coreutils for example
But yes, I am making userspace programs only, since I don't own any embedded device and there is no reason to try and develop my own desktop OS because it would not be better than what currently exists.
Anonymous No.106513149
>>106513134
Yeah, it's true. Still, drivers, operating systems, embedded systems is more typical example of systems programming, even if it might be actually a minority if you consider total LoC.
Anonymous No.106513257 >>106513269
>>106511980 (OP)

https://lngnmn2.github.io/articles/programming-without-vapecoding/

/thread
Anonymous No.106513269
>>106513257
>vapecoding
,?