[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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: rustacean-flat-happy.png (44 KB, 460x307)
44 KB PNG
>Use Rust for the first time to rewrite a Lua plugin
>Option types
>Unwrap
>Pattern matching
>C level performance
>Compartmentalized cargo testing
>First class functions
>Ownership
>Generics
It's like the power of functional programming with the imperative low level control of C
Rust is the language of this century. I'm fully oxidized. So should you.
>>
>>109066930
once real small low-level stuff is in rust I'd be amazed.

nowadays you cannot even do a really small hello world on it with just SYS_write + SYS_exit that is as small or smaller than C built binaries.
>>
>>109066930
it's neat, i use it because it's just the best tool for most of what i'm doing but i'd not go as far as making a thread to shill it.
>>
I'm cis and I use Ruby
>>
>>109066930
I am not willing to go through ego death.
>>
>>109066930
>no meta programming
>unreadable dogshit
>unstable dogshit
Why wouldn't I just use lean 4? I might take the ferrocene pill.
>>
>>109068462
And I didn't even mention the dogshit ecosystem that is somehow worse than NPM. Holy fuck!
At least there are sexed up trannies to pump and dump.
>>
>>109066930
you're like a decade late to the party desu
unless you thought /g/eet tards matter lol
>>
File: jazz-music-stops.jpg (70 KB, 800x450)
70 KB JPG
Just use C and if you need memory safety use gc language like Java. Simple as.
>>
Did you know that rust toolchain is 1.4GB?
$ du -sh ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/
1.4G /home/ywnbaw/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/

Did you know that java jdk is 0.33GB?
$ du -sh /usr/lib/jvm/java-1.25.0-openjdk-amd64/
331M /usr/lib/jvm/java-1.25.0-openjdk-amd64/

that mean's you can have jdk, .net, g++/gcc and more in space of one single rust toolchain! Cool, huh?
>>
>>109069131
>he cannot conceive of having both speed and memory safety
pitiful
>>
dotnet is like 100 niggabytes just on its own
>>
>>109069209
i like my compilation times low and disk space free for hentai and i like to pick the RIGHT tool for the job
>>
Usecase for Rust? I literally never need manual memory management and I don't larp as le serious systems programmer, so I just write in D, Go and scripting languages when it's appropriate. But if I needed manual memory management, I'd rather write in C, Better C (D without GC), or maybe Zig.
>>
>>109069216
nah .net sdk is about 450MB so slightly larger than jdk but in the same ballpark
>>
>>109066930
because the module system sucks, and so does the dependency culture. im not going to use a language where im effectively locked into never using any libraries because it has IsEven syndrome and every dependency depends on 20 other dependencies.
>>
>>109068462
lean is overhyped desu, completely irrespective of rust
>>
>>109066953
>hello world
>small
You want to write "Hello World!" to where exactly?
Terminal? So you can see it in your terminal **emulator**? So you want your program to interact with fully fledged UNIX-like operating system running several layers of abstractions pretending to be 1970s terminal to a mainframe computer and you think it's small?
>>
>>109069306
Yep, stdout is just a file as far as I'm concerned.
>>
>>109069320
>has file abstraction available
>still thinks its small
>>
I will never use troonst
>>
>>109069257
It's just the forerunner of a group of languages that are going to make a "big impact" in the next decade.
>>
File: eating-the-chip-chips.gif (205 KB, 220x124)
205 KB GIF
>>109069230
complexity management.

for a smaller project, you can probably reason through manual memory management fairly successfully, but as the complexity of the program and the possible number of states grows it quickly becomes a headache to manage that properly.

if you're writing projects where a memory leak or a crash doesn't matter and nobody other than you will run it then you can of course jeetmaxx and write terrible C like its 19XX. but if your program needs to be provably reliable then rust provides many guarantees out of the box. in my experience, writing thoroughly tested and safe C code takes as much if not more effort than just writing the same thing in rust.

many people familiar with C recoil in horror when the rust compiler doesn't allow them to do something, but then go back to C and silently spend hours debugging segfaults

rust essentially allows you to delegate some of the cognitive load of systems programming to your computer. if you don't see the value in that then there is nothing to discuss.
>>
>>109066930
You’re delusional if you think rust is even remotely as performant as C.
>>
>>109069332
well, where I live I/O is the kernel's job and i will leverage that, and will use literal 1 for the piss and 2 for the shit, thank you very much
/* Standard file descriptors.  */
#define STDIN_FILENO 0 /* Standard input. */
#define STDOUT_FILENO 1 /* Standard output. */
#define STDERR_FILENO 2 /* Standard error output. */
>>
>>109069176
now build uberjars of anything using something like spring and then shove that JRE + jar file in a container and then balk how the Rust compiler is smaller.
>>
>>109069424
>he doesn't buffer his streams
>and floods the kernel with syscalls
>>
>>109069223
what job has java as the right tool?
literally none.
even M$ seems to be edging towards Rust (and literally anything else) because .NET is gay. Reminder there are now bindings to WinUI 3 in Rust now as well.

high level, garbage collected languages will never be real programming, and will never have the speed and latency of something like Rust or C++.
>>
>>109069424
why the fuck do you care about freestanding if your shitcode is targeting a general purpose computer capable of running a POSIX OS? Literally what kind of mental illness is this?
>>
>>109066964
This, just extend it with C if you need performance.
>>
File: quarkus-throughput.png (87 KB, 855x865)
87 KB PNG
>>109069452
why use spring when there is quarkus and it's pretty damn comfy and quick to build and performant and you can go with native graalvm images for extra perfomance. neat, i must say!
>>
>>109069497
>troon
>talking about mental illness
is this the power of rust? did you forgot to take your meds?
>>
>>109069504
because going to Quarkus implies rewrite. either way, your own gay image shows that "native comp" is way slower and your container images and startup times are still shit.
>>
>>109069511
I'm not the mentally ill retard who feels the need to reinvent stdio for a program running on a general purpose OS. If you want to do that, write inline assembly and fuck off.
>>
>>109066930
Unironically I've kinda started to like zig ngl.
>>
>>109066930
deep diving into C and C++ right now, but I will be doing rust after. Need to get a cool embedded or systems job and I think those jobs will eventually be asking for rust or at least have rust as a "desired" skill if not required. Still from my limited experience with rust I do not care for the syntax. Think C has the best syntax of all time
>>
>>109069521
meh, startup times are enough for my usecase. you are shit. rust is shit with it's compilation times, humongous toolchain, humongous target executables and borrow-checker masturbation. java and .net are sublime comfy heaven in comparison.
>>
>>109069343
Complexity management... if your system is huge and you're saying ALL of it requires memory management I don't believe you, unless you're maybe writing an OS or a performant game (which people don't write in Rust anyway). So I'd say, write small parts of it with manual memory management in C or something sane and the rest can be written in a GC language.
>>
>>109069556
>target/release/binary
>3MiB
>target/*.jar
>353MiB
shut the fuck up moron.
>>
>>109069529
you will never be a woman. meds now!
>>
>>109069573
you are hallucinating again and hearing voices. are those jars in the room with you right now? meds now!
>>
>>109069577
neither will you.
reminder Linux is the only OS where you can even get away with your flavor of tranny-brained mental illness.
>>
>>109069585
>he doesn't know that you can use mingw on windows
i have still my dick attached, and it even has intact foreskin. how about you, tranny?
>>
>>109069632
what the fuck? mingw depends on MSVCRT or UCRT you stupid nigger.
>>
>>109069566
>(which people don't write in Rust anyway).
https://www.redox-os.org/
https://bevy.org/examples/#games
there is also a game on steam using bevy, but I can't remember it.
>>
>>109069176
>pointing to something irrelevant
>not even doing it right
CONGRATULATIONS! you won the /g/EET-MAXING award for today. This is not a small feat considering the very fierce competition around.
>>
>>109069645
that means i can still use unistd.h and other posix shit, tranny faggot. i don't care what's behind it
>>
>>109069685
cope, seethe, dilate, tranny
>>
sigh
18 year old jeets are going to do these threads all summer, aren't they
>>
>>109069566
Rusts complexity management features are about much more than memory management
>Pattern matching
>Traits
>Modules
>Haskell tier type system
>etc.
>>
>>109069702
>fellow /g/eets believed my no-context numbers and i won izzat
lol
>>
File: stirring.jpg (71 KB, 960x720)
71 KB JPG
>>109069723
ohh, don't give up, tranny faggot-san. rust bloat needs you advocacy! it will wither and decompose like your severed genitals without your assitance!
>>
>>109066930
I like to program for fun. So it doesn't fit my use case.
>>
>>109069732
>Haskell tier type system
lol



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