[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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


Rust fags told me it was just as fast as C++, but a lot safer.

Wtf rust fags?
>>
>>107486317
A database orm with multi language support has to be the most retarded concept ever. Btw, the performance gains came from avoiding node's shitty ffi, not from avoiding rust, obviously.
>>
>>107486317
Show the code in Rust vs JS.
>>
>>107486317
Why does his nose look like that?
>>
>hitching your wagon to language flame war bullshit
Does it actually make money? How? Who gives this faggot monetizable (You)s?
>>
>>107486439
the fate of western civilization hangs in the balance, if the crabs win one day you will wake up and therell be no more statues
>>
>>107486317

1. Rust compiler is still kinda unstable, so it won’t be as fast as C++ which has been built over 20-30 years and had many optimizations
2. However, it’s easier to get to an optimal solution in Rust than C++ due to the compiler helping you get there quicker because of all the restrictions
3. On average, that means Rust code will be faster than C++, not because it is fast as C++ (optimal C++ code will be faster) but because it helps average programmers get to 70-80% of the way there quicker.

Hope that helps.
>>
>>107486439
https://desuarchive.org/g/thread/107168629/#q107170768
>>
>>107486317
Shitdevs writing shit code, language doesn't matter. Notice how they switched to TypeScript, not C/C++/Go, because the majority users of their library are TypeScript devs.
>>
holy cope itt
crabs reeling, in shambles
>>
>>107486317
>rewrite code in another language
>forces examination of coding patterns and incentivizes considerations for refactoring bad code
>people think it's faster because of the language instead of different algos
>>
>>107486686
You sound reasonable, would picking rust as my first real programming language a good idea? I know how to do small things and I understand basics like pointers loops and so on but I've never read anything or had any formal education.
From the way you phrase it it sounds like it'd be nice as a first language because those restrictions could act as a good "teacher" for good behavior.
>>
File: 1743173215999927.png (56 KB, 1000x1000)
56 KB
56 KB PNG
>>107486317
>/g/ is now unironically shilling Javascript
Buy an ad
>>
>>107486978
>real programming language
code from 10 years ago doesnt conpile
>>
>>107487132
I'll take JS over Rust any day and I fucking loathe JS
>>
If you ever wonder why Rust programs are slow, remember the .unwrap() that took down the internet.
>>
>>107486686
On average, Rust programmers are nocoders which is why Rust is never as fast as C++
>>
>>107486317
> le kike saying some bs about rust
why should i care, especialy when this is the reason : >>107486378
>>
>>107486864
rust calling js functions is slower than js calling js functions, what a god damn shocker.
>>
>>107488273
>rust is slower than js
>>
>>107488297
>what even is a ffi and the performance costs of using one.
you are brown
>>
>>107488326
sounds like a rust (brown) thing
>>
>>107488430
> ffi is a rust thing
nocoder spotted
>>
>>107487500
> code from 10 years ago doesnt conpile
not only is this false, rust is backward compatible to all versions after 1.0 which was in 2015.
>>
>>107487132
node is fast as fuck for what it is, it's kind of strange honestly
>>
>>107488480
it's because it's based on libuv which itself uses epoll.
also it's jit.

still, fuck js.
>>
>>107486317
>rust is "LE BAD!"
>uses node ffi

what a joke
>>
>>107488520
everytime there is some big news about "MUH LE RUST IS BAD"
> look inside
> the issue isn't actualy related to rust
kek
>>
File: 1761782582966148.png (261 KB, 1200x800)
261 KB
261 KB PNG
>>107486317
>unc has to resort to lies, misinformation, ragebait articles by technically inept jew to "win" his "language wars"
>the opposite side did not show up to the battlefield
damn that sucks
>>
>>107486686
why in the world would you think that a more restrictive compiler makes your code faster????
That doesnt even make any sense.

Rust code that is littered with unsafe {} is faster than Rust code without, and it's very obvious why.
Taking options away from you, often means to take away the most performant solution.
>>
File: 1764384668883619.png (100 KB, 627x722)
100 KB
100 KB PNG
>>107488682
>>
>>107488780
Because it would if its implementers weren't mentally ill.
>>
>>107486317
Common pozilla L. Fuck trannyfox and fuck rustrannies.
>>
Javascript also caused less global internet outges than rust, makes me think.
>>
>>107488656
>> look inside
>> the issue is rust devs
>kek
>>
>>107488162
> nocoders
Bandwagon jumpers
Racing each other to find shit to c2rust translate
Newbies entering the market that:
• Don’t know any better
• Appreciate that nobody else understands this weird, esoteric language.
>>
>>107489060
More lines of javascript have already been written—by many orders of magnitude—than will ever be written in the entire history and useful lifetime of Rust.
Let that sink in.
>>
>>107488656
Just like the “memory safety issues” aren’t related to C or C++
>>
File: IMG_3335.gif (2.66 MB, 423x315)
2.66 MB
2.66 MB GIF
>>107486978
>>
I like Rust, talking about it here reveals just how midwitted average /g/ poster is. And yes Alkeryn, I am indeed talking about (You) here.
>>
>>107489488
It gets even funnier when you look at things for what they really are.
>JavaScript
Thinly veiled C++ scripting language that justwerks.
>Rust
Thinly veiled C++ compiler that just.unwrap()-ACK
>>
>>107486317
Buy an ad shill
>>
>>107489608
You first.
>>
surprise, they were wrong
>>
File: frog.jpg (54 KB, 976x850)
54 KB
54 KB JPG
epoll.add(
stdin,
epoll::Event {
flags: epoll::IN,
data: pin!(Fd::Stdin(stdin)),
},
)?;

>this is UB but compiles fine in safe rust, even despite the nonsense pin! macro that should tell me if something is wrong with lifetime of the data
let data = pin!(Fd::Stdin(stdin));
epoll.add(
stdin,
epoll::Event {
flags: epoll::IN,
data: data.into_ref(),
},
)?;

>This is how it should be written instead
What a joke of a memelang.
>>
File: file.png (136 KB, 522x603)
136 KB
136 KB PNG
>>107486378
>A database orm with multi language support has to be the most retarded concept ever
the levels of cope
>>
>>107486978

No, learn C and learn how computers work. The restrictions Rust imposes are important so you don’t shoot yourself in the foot when you’re delivering things, but if you’re learning, it’s better to learn why the restrictions are important.

>>107488162

Safe modern C++ abstractions, which you use in production code, will make your code as slow as Rust. That std::shared_ptr you use is as costly as using Rc in Rust.

>>107488780

Cause it’s harder to shoot yourself in the foot and there’s typically one “right” way to do things.

Yes, unsafe code will be faster than safe code in Rust, but try to deliver safe code in C++ to see if it’s faster than Rust.

There’s a penalty you pay for safety, and you can’t compare apples to oranges.
>>
>>107493296
My C++ code is safer than Rust because I don't expect my compiler to save me.
>>
>>107493314

If you know your shit, ofc it’s gonna be faster. The main advantage of Rust is allowing midwits to do lowish level programming without shooting themselves in the foot.
Most programmers you’ll meet and work with are going to be midwits, and you can’t have things being too clever for them.
It’s why people in the web love Golang despite being a retarded language.
>>
>>107493370
Explain >>107493139 then.
>>
>>107493378

I hate pin.
>>
>>107493392
It has nothing to do with pin, I already fixed it, doesn't change the fact that I had to do same thing as in C++ to test if it's sound.
>>
help: you might have meant to use field `pointer` whose type is `&Fd<'_>`
|
43 | match event_data.pointer {
| ++++++++


>
error[E0616]: field `pointer` of struct `Pin` is private
--> src/main.rs:43:26
|
43 | match event_data.pointer {
| ^^^^^^^ private field


Having Rust fatigue rn.
>>
>>107486317
I love this Jew and im tired pretending otherwise.
Rust Troons are devil and they want to destroy Linux and everything else they touch. Fuck those cultists... i will even side with JEW if i can damage them.
>>
>>107493296
>No, learn C and learn how computers work.
C has nothing to do with how computers work. It's just Pascal made by stupid people. Computers don't have math expressions, structs, structured loops, C preprocessors, #include, or any of the other features of C. The closest thing to "how computers work" in C is goto, but Lisp and a lot of interpreted languages have that too.
>>
File: oh-no-anyway.jpg (107 KB, 768x894)
107 KB
107 KB JPG
buy an ad
>>
>>107486978
>would picking rust as my first real programming language a good idea?
No. Rust is very difficult with even steeper learning curve
Learn C first to get the basics. Only then consider Rust if systems programming is really want you want.
>>
>>107493910
C is the most approachable systems programming language right now. It's a good place to learn basics like pointers, memory management, bit level operations, how compilation and linking works, etc.
>>
File: chadcerned.jpg (2 KB, 162x116)
2 KB
2 KB JPG
>>107494023
C feels very liberating to use but I always go back to C++ to bikeshed abstractions like a crack addict.
>>
>>107486931
Algos are the most important, but language definitely matters in the sense that C++ murders Python. Once you get up to the top performing group of languages (C, C++, Zig, Rust, etc) the differences are marginal, and its the features and algos you implement with it that matter.
>>
File: I told you so, DYEL.jpg (325 KB, 1110x1200)
325 KB
325 KB JPG
>>107486931
>Write code in a language that claims to save you
>Code is shit, sluggish, a mess.
>Write code in language that couldn't even tell you an exact unique type name for that JSON tree
>Code is fine, justwerks very fast.
>>
>>107486317
>BAJILLION PER CENT PER FORMANCE BOOST BY DROPPING RUST
>actually removed the sleep(50000) like a baws
>>
>>107489504
sure, but it makes it very easy to make a mistake.
you are not constantly performing at your best if you've ever written a big project.
rust allows you to focus your attention on the parts that are more sensitive instead of having to spread it in the whole codebase.
>>
>>107489386
in this case the issue wasn't so much rust devs but the fact that they were using an ffi and js.
>>
>>107489556
if you think rust is a c++ compiler you are a retard.
>>
>>107493587
skill issue, as usual
>>
>>107493628
cool story shlomo
>>
>>107494185
rather.
> call js to and from rust through ffi overhead
> complains it's slower than calling js to and from js
the issue is the ffi overhead, if you were calling rust from rust you will always outperform js shit.
>>
the rust hate astroturfing, anyone with a brain would realise what's happening and what shlomo is attempting to do.
kek
>>
>>107493139
what does this have to do with rust? the unsafe part is literally epoll
>>
>>107486978
I'm wanting to learn something new too, I picked C# but since I'm a linuxfag it is rather garbage to pick up there, and I ain't installing windows on my computer.
Are there good UI and webdev solutions that are somewhat easy to get into more or less like blazor and MAUI do with C#?
I know rust's got GTK and the retarded shit cosmic uses.
>>
>>107493221
The cope is the next sentence retard.
>>
File: troonduke.png (27 KB, 515x621)
27 KB
27 KB PNG
>>107486317
>>
What I hate about the discourse on Rust is there are genuine things to hate about it which never get mentioned, I can think of the following:
Pin/Unpin is confusing
Async is incomplete and there’s effectively no easy way to write runtime agnostic asynchronous code.
From what I can recall. Yet, no hate thread on Rust mentions it.
>>
>>107495978
>there’s effectively no easy way to write runtime agnostic asynchronous code
that's not true though.

the thing i dislike the most is that proc_macros need to be separate crates, and that normal macros whilst powerful have a pretty meh syntax.
>>
>>107486317
they should rewrite in go
>>
>>107496602
or in rust, they'd have the exact same ffi issue but worse.
the issue wasn't rust, it's that they wanted it to be js shit and thus had to use a ffi to use rust as well.
if you use go you got the ffi problem again but with language that's even worse.
>>
>>107486686
It's a fucking llvm wrapper u dumdum, no low-level lang is slower than a high level no matter the optimizations.
The only thing this says is the language kinda gets in your way when you try to write fast toolchains, that's it - their rust developer was just worse than their javascript developer, which is hilarious but poetic.
>>
File: 1750180974760103.png (675 KB, 1170x941)
675 KB
675 KB PNG
>>107495225
Anti-Semitism is the Israeli government's strength.
>>
>>107487132
I mean... Javascript is faster than Rust, and you have no problem with people shilling Rust, so... ?
>>
>>107499114
>js is faster than rust
source?
>>
>>107499067
what kind of retarded take is that shlomo.
>>
>>107499114
the only thing js is faster than rust at is calling a js function because it has no ffi overhead.
>>
>>107499181
>The anti-Semites will become our most dependable friends, the anti-Semitic countries our allies. —Theodore Herzl
Basic Zionist theory, you illiterate homo erectus.
>>
>>107499230
> the people that hates us will be our friends
very nice inversion, what in the kike retardation is that.
>>
>>107499230
>>107499305
imagine believing a kike on anything lmao.
>>
>>107499067
>>107495225
> shlomo still didn't deny what he was doing
lol
>>
File: 20250825_065159.jpg (143 KB, 934x1169)
143 KB
143 KB JPG
>>107499305
>antisemitism must remain for the project of Jewish nationalism to succeed. In his diaries, Herzl wrote that the antisemites would become the “best friends” of the Zionists, since they would consistently make the case that cohabitation was impossible and the only viable strategy for any peaceful arrangement was separation.
The guy was a Mason,
>>107499336
>12 minutes
Hello Project F.A.E. LLM
https://so__owowhatisthis__yjakwiki.org/Project_F.A.E.#/
>>
>>107499387
>only viable strategy for any peaceful arrangement was separation.
that was a century ago, today we understand that a peaceful arrangement is not possible.
>12 minutes
what are you talking about ?
>>
when lunduke speaks tech facts you guys lose your minds. what causes such derangement? is it literally just because he doesn't like trannies? what is the ratio of transgenders to normals on this board?
>>
>>107499408
I can't believe anything but LLM trolls can be as dumb as you are, sorry lil brocow.
>>
File: file.png (141 KB, 1096x525)
141 KB
141 KB PNG
>>107499424
an llm wouldn't be able to screen cap like this
nice try gargamel though
>>
>>107486422
judiasm
>>
File: 2112992.jpg (63 KB, 768x432)
63 KB
63 KB JPG
>>107499538
as if a shartynigger would have the sense to automate posting rather than copypaste from a random free ai website
>>
>>107486317
fuck rustup, it's like everything is python now fuck off
>>
File: file.png (150 KB, 632x302)
150 KB
150 KB PNG
>>107499561
why would i waste time copy pasting gptslop though?
also automating is trivial, i've done plenty of meme prompt eng in the past, but unlike you i don't see the point in shitting threads.
>>
>>107499583
why do people raid?
I wouldn't know, I've only heard stories of pre-cucked ancient 4chan
>>
>>107499599
>why do people raid?
either browns, or glowies.
>>
>>107499583
Why are you returning dynamically allocated strings
>>
>>107499632
it's 2025 so the glowies are probably brown and the browns glowies
like attracts like, niggers gonna chimp
>>
File: file.png (531 KB, 672x871)
531 KB
531 KB PNG
>>107499653
because the only thing that uses that function is needing a string anyway, though i could have put a single .into() at the end of the match, this was kind of made in a rush when i was still prototyping and it was more of a weekend side project, i focused more on the stt_tts pipeline, i used sovits at the time
>>
>>107499725
>>107499653
also second reason, was thinking about possible other format that i may add in the future that may require dynamic allocation anyway.
anyway, this is i/o bound, caring about muh string when the request is gonna take 20 million times longer is kinda eh.
>>
>>107496571

Cool, actually, can you send me resources on this? It’d be nice to know how that (agnostic asynchronous code) got fixed, my main lang isn’t Rust so that's why I mentioned it because that is how far as I knew.
>>
>>107499777
well any async function is gonna be agnostic to its runtime until you use runtime specific functions.
so one way to do it is to have your function be normal code, and then use conditional compilation for the places that differs.
generaly you'd have wrapping function that abstract those runtime specific functions.
another way would be to use crates that do it as an abstraction layer like async_net

lastly, there are runtime agnostic crates like futures, futures_net etc...
>>
>>107499875
>>107499777
also this may sound weird but technicaly you can use many of tokio's types under another runtime
>>
>>107499777
i think async-net tcp implementation may give you a nice idea: https://github.com/smol-rs/async-net/blob/master/src/tcp.rs
>>
File: file.png (113 KB, 795x128)
113 KB
113 KB PNG
>>107499777
ie this code works under tokio but it'd work under any other runtime
>>
>>107486799
nta,
but not going to lie, typescripts IDE support is very very good. It's essentially running unit tests constantly and has very complex interfaces that massively cover for JS's poor typing.
>>
File: file.png (87 KB, 783x139)
87 KB
87 KB PNG
>>107500026
>>107499777
as an example, here is the same function but using the compio runtime instead, and it just works
https://github.com/compio-rs/compio
>>
>>107495978
>async is incomplete
well fuck, thats an instant no from me dawg, I need to run most things in parallel.
>>
>>107500071
it isn't, also async has nothing to do with parallel async is for concurency.
yes async code can run concurently and in parallel ie tokio and compio will use threadpools but that's two different concepts

also if you want multithreading for compute you are better off using rayon than some async runtime.
>>
>>107500071
>>107500098
a nice thing with rust if you use the futures crate is that you can do stuff like vec.iter().for_each_concurrent(concurency, |i| async { your code that uses i and whatnot})

you can also just use .map() and then .buffered_unordered(concurency).
if you want concurency and parallelism you can also do it it's just a tiny bit more work.
>>
>>107488439
That's not true. I've been using FFI for years and never knew it was called that
>>
>>107500124
my point is that foreign functions interfaces are not a rust things, go has ffi, c has ffi, zig has ffi, wasm has ffi, python has ffi.
pretty much all real language have some form of ffi.
calling a foreign function through a ffi will always have more overhead than calling a function from the language you are using, that's pm a universal rule.
now if the language you are calling is faster than the language you are calling from, it could still lead to slow downs if the ffi overhead is higher than the time it took in the language in the first place.
ffi makes sense for performance only if otherwise it'd have taken a lot more time than the overhead.
another reason to use ffi is to be able to call code made with other languages, which was the reason in this case.

either way, you can't blame rust for an overhead that's inherent to using a ffi.
the reason i said that anon was a nocoder was that he thought FFI's were a rust thing when they are not.
>>
>>107500207
My point is that you can write multi-lang programs without knowing what FFI is
>>
>>107500223
> you can write multi-lang programs without knowing what FFI is
not if you want to directly call a lang A function from lang B.
if you want to call rust code from js or vice versa you have no choice but to use a ffi, and thus, you'll know what one is.
anyway, even a dev that doesn't do multilang stuff would know what a ffi is.

truely, someone that doesn't is either a webshitter or a nocoder, and they are the same thing
>>
>>107500223
>>107500242
anyway, the point is you may not know that you are using a ffi only if you are using libs that internaly use one but you yourself are not exposed to it, regardless that's irrelevant to the current situation because they were writting the ffi code.
>>
>>107500242
>not if you want to directly call a lang A function from lang B.
Factually false given my previous statements
>>
>>107500262
you are larping, i don't believe you.
show example of calling lang A function from lang B without using an ffi.
oh and it must be a real programming language not some meme esolang that no one uses.
>>
>>107500314
No it totally uses ffi, I just didn't know it was called that. Learn to fucking read.
>>
>>107500326
> i used something without knowing its name
i don't believe you, anyone that has ever used a ffi know what one is.
it's obvious that you are backpedaling now.
even if you had forgotten the acronym you should have guessed it from the context if you knew what you were talking about especially since this was linked : >>107486378

the dude even said "avoiding node's ffi" and you said "sounds like a rust thing".
>>
>>107500392
>>107500326
also you precisely said "without knowing what ffi is" not anything regarding how it was called but what it is, see : >>107500223
>>
>>107500392
I'm not backpedaling shit. It's not that hard to google something like "call X lang function in Y lang"

>>107500401
No shit I called it what it is, it was specifically explained itt. That's the only reason I know what it is to begin with
>>
>>107500416
>>107500223
> My point is that you can write multi-lang programs without knowing what FFI is
no, because you'd have to learn what FFI is to do so.

you admited not knowing what it is, not even not knowing the acronym but what FFI itself IS.
either way, even if we assumed that you are not lying / backpedaling because you got caught in your bullshit.

saying : >>107488430
about something you don't know shit about just show how much of a retard you are, you are literaly here just to troll, if you weren't you'd have taken the time to search what i was talking about without replying "sounds like a rust (brown) thing"
>>
>>107500458
No you don't. You literally just have to google what I said, you fucking retard.
>you admited not knowing what it is, not even not knowing the acronym but what FFI itself IS.
I was going to link to a post but looking back I did google it, either way I don't know what's so hard for you to grasp. I saw FFI come up, googled "FFI programming", then basically went "Oh I've used that before but didn't know it was called that"
>>
HAPPENING: Rustfags won for good
https://news.ycombinator.com/item?id=46213585

Meanwhile Lunduke is yapping about a random mastodon tranny
https://www.youtube.com/watch?v=oY7L2tWjkPM
>>
>>107500479
eh whatever, say you aren't lying, then why post this : >>107488430

saying "this sound like a x thing" when you don't know what you are talking about just put you up to be laughed at or considered a troll.
>>
>>107500555
That wasn't me.
>>
>>107486317
Buy an ad, Lunduke.
>>
File: 1687441910451991.png (592 KB, 747x800)
592 KB
592 KB PNG
>>107500566
>>
>>107499114
>I mean... Javascript is faster than Rust
Which is why one of the fastest Javascript runtimes is written in Rust? lmao
>>
>>107500512
Troonduke i know you leech off /g/ for content. Stop yapping about trannies
>>
>>107500585
Buddy I found this thread less than an hour ago. Don't believe me all you want but my first post was >>107500124
>>
>>107500056

Ah yes, but I mean the primitives. If I were to distribute a lib that has async I'm not sure if I can and guarantee that will run agnostic to the runtime.

Especially because some of the broadcast/IO primitives are tied to the runtime:

e.g.:
https://docs.rs/tokio/latest/tokio/sync/watch/index.html
https://docs.rs/tokio/latest/tokio/io/index.html

From what I understand the standard "interface" crate is the "futures" one that tokio/compio implements, but maybe i'm confused around what traits are coming from there/aren't.
>>
>>107499875
>>107499920
>>107499937
>>107500026

Completely missed this, thanks mate!
>>
>>107486686
You're retarded.
>>107486978
Rust is not a great first programming language unless you have a lot of patience.
C is an OK choice, but hinges largely on your desire to learn how to program while ignoring any kind of instant gratification. If you have the patience C is a great choice but if it becomes too frustrating then it's a bad choice. C is probably my first choice for a first language, assuming it's a good personality fit.
Python or Javascript are OK choices but you will learn less about computers. In exchange you get a relatively easy to use vast library of software. Either of these make a reasonable second choice.
As an honorary mention, if you are interested in achieving satori, then a Lisp of some flavor is an excellent choice as well.
>>
>>107500071

Async is not parallel computing, it’s coroutine-like (not really because most runtimes run on top of threadpools).
>>
>>107500668
in rust with most runtimes async tasks will also run within a threadpool so it'll also be parallel but yes the original point of async is concurecy not parallelism.

so if you did 6 tokio::task::spawn() for example, you could expect somewhere around 6 times the raw number crunching performance provided you got enough cores and didn't start the runtime single threaded.
still for raw number crunching you are better off using actual threads or something like rayon.

i do like the threadpool though, because it's concurrent first but you still benefit from having more cores.
>>
>>107500598
>One of
>>
>>107495196
Ye, skill issue in the rust compiler suggesting me to use private fields of a struct that I didn't write lmao.
>>
>>107501098
> use struct improperly
> bitch about the compiler
have you figured out hello world already ?
>>
>>107501116
>>use struct improperly
what could that possibly mean?
>>
>>107501122
if you try to use a private field of a struct you didn't write, then that means you are not using a library the way you should.
>>
>>107501079
that's beside the point, rust is much faster than javascript, there is no comparison to be made.
>>
>>107501150
And I didn't try to? Compiler suggested it for no reason, you worthless clown.
>>
>>107501185
> you might have meant to use field `pointer` whose type is `&Fd<'_>`
> field `pointer` of struct `Pin` is private
can you like, read ?
>>
>>107501206
Yes, I can read that compiler really just suggested me to use a private field.
I know that you're brown and have hard time contextualizing, just like your tranny compiler that should know not to suggest using private fields.
>>
>>107501217
> I can read
i'm not quite sure.
anyway, he told you to try to ues pointer of a &Fd<'_> and you tried to use pointer of Pin

those are not the same types even if they have the same fields.
also, the compiler suggestions aren't gospel, maybe you shouldn't be using a pointer field whatsoever and it just tried to give you the closest thing to what you tried to do.
>>
>>107486686
>However, it’s easier to get to an optimal solution in Rust than C++ due to the compiler helping you get there quicker
you mean the exact opposite right? in c++ you don't have to fight the borrow checker and you can write a linked list implementation without mental gymnastics
>>
File: 74836489364847.png (282 KB, 641x572)
282 KB
282 KB PNG
>>107499561
Is that karbonkel de eenoog?!
>>
>>107501277
>you mean the exact opposite right?
NTA but no
the borrow checker only gets in the way when you don't know the language.
once you master it you don't even think about it anymore, and the many other nice features of rust do indeed allow you to be much more productive with it.
> write a linked list implementation without mental gymnastics
1. near useless data struct
2. you can, it's trivial to write
>>
>>107501277

That’s why the use of optimal
You can quickly hack a linked list in C++ indeed, but try adding guarantees that you’d expect to see in production code to prevent buffer overflow, for example.
Rust forces you to do production ready code, by default. Now you can argue if that’s a bad thing or a good thing, but that’s what I meant by it.
>>
>>107501270
>he told you to try to ues pointer of a &Fd<'_> and you tried to use pointer of Pin
I really hope this is bait because I haven't seen such ESL nigger in my entire life.
>>
>>107501302
it, use*
omg, what a huge correction, i'm sleepy what can i say.
anyway, fix your code and stop complaining, the issue is in your code not the compiler.
>>
>demented rust shill seriously is going to defend compiler bugs now
>>
>>107501302
>>107501311
also i'm a french speaker, can you even say that you speak 2 lang.
stop changing the topic, and fix your shit.
>>
>>107501316
> utter incompetence
> blames the compiler
are you the guy that couldn't write a no_std hello world and blamed the compiler for hours ?
you sound like him.
>>
>>107501323
   |
43 | match event_data {
| ---------- this expression has type `Pin<&Fd<'_>>`
...
50 | &Fd::Stderr(fd) => {
| ^^^^^^^^^^^^^^^ expected `Pin<&Fd<'_>>`, found `&_`
|
= note: expected struct `Pin<&Fd<'_>>`
found reference `&_`
help: you might have meant to use field `pointer` whose type is `&Fd<'_>`
|
43 | match event_data.pointer {
| ++++++++

>utter incompetence
in the compiler lmao
>uses the gay site to doublepost and shit up this whole site
figures
>>
>>107501332
> doublepost
as i said, i'm pretty tired now, did a night shift, gonna sleep soon, i wanted to correct a spelling mistake since you care so much about those.

you know, without more context i can't tell you much but i'm pretty sure the issue is your broken code again, you are the same guy that blamed the compiler for hours because you couldn't write a no_std hello world and then coped like i've never seen once a solution was provided to you.
>>
File: carbon (2).png (1.57 MB, 2164x9378)
1.57 MB
1.57 MB PNG
>>107486978
you should learn Elixir
screenshot is some code I've written to prove I know what I am talking about
>>
>compiler should suggest deref
>suggests using a private field
>noooo, ur using rust wrong
lmao @ u tranny, you made two identical posts less than 60 seconds apart, I'm done entertaining your mental illness
>>
>>107501332
>>107501349
also try dereferencing.
>>
>>107501357
it literaly tells you that you use the field of the wrong struct.
you are a retard.
>>
>>107501357
> identical
if you had noticed you'd have seen that i did a spelling correction, they weren't identical.
>>
>>107501365
I understand that you really believe that. And I wish you best of luck in your retarded nigger life.
>>
>>107501370
> still can't write a hello world
lmao, keep coping ranjeet
>>
>>107501369
So? 4chan allows 1 post per 60 seconds.
I don't read your posts if they're longer than 1 sentence by the way.
>>
>>107501332
weird how you seem to be the only one having issues compiling your code, could it be that the issue is you ?
>>
>>107501379
>4chan allows 1 post per 60 seconds
what even is a pass.
>>
>>107501387
Something you would've revealed in the same post if you had it.
>>
>>107501395
why would i reveal that info if you didn't ask?
anyway regarding.
>compiler should suggest deref
>suggests using a private field

if you have a type foo<bar> that impl deref and both foo and bar have a field named the same, the compiler isn't sure which one you meant, yes it could assume that you meant the one that wasn't private ie bar.foobar and not foo.foobar, but assumption can lead to mistakes, and in the case where it is ambiguous it rather ask you to be explicit..
>>
Yea yea I know that rust is mentally ill and doesn't know that type Pin is a type in Rust standard library and a pointer and is meant to be deref'd
lmaoing @ ur nigger life
>>
>>107486317
Did you even watch the video you're posting?
>>
>>107501417
> he thinks the compiler making special exception for std code would be good design
you are a retard if you honestly believe that.
this is just the general behavior, it doesn't make an exception for std code.
>>
Entire Rust std uses experimental features, it's already specially excepted, you useless nocoder.
>>
>words words words
error[E0793]: reference to packed field is unaligned
--> src/main.rs:42:16
|
42 | match *event.data {
| ^^^^^^^^^^
|
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)

didn't read allat
>>
>>107501441
> muh experimental features
gating a feature is not the same thing as making exception to the behavior of the compiler for specific types
> you useless nocoder
yet, you are the one that can't compile your code.
>>
>tranny is trying to troll about supposedly me being unable to compile the code instead of understanding what errors say and why rust is a niggertarded toy
figures, really
>>
>>107501465
> supposedly me being unable to compile the code
not supposedly, you are literaly being filterd by the most trivial shit.
also you don't understand the error yourself and yet you expect people that don't even have your shitty codebase to understand what you did wrong exactly, see : >>107402251
>>
>>107501487
But my code compiles and runs just fine though?
% strace target/release/tranny_stress_test
execve("target/release/tranny_stress_test", ["target/release/tranny_stress_tes"...], 0x7ffe5119e390 /* 38 vars */) = 0
epoll_create1(EPOLL_CLOEXEC) = 3
epoll_ctl(3, EPOLL_CTL_ADD, 0, {events=EPOLLIN|EPOLLET, data=0x7ffff52088e8}) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 1, {events=EPOLLOUT|EPOLLET, data=0x7ffff52088f0}) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 2, {events=EPOLLOUT|EPOLLET, data=0x7ffff52088f8}) = 0
epoll_wait(3, [{events=EPOLLOUT, data=0x7ffff52088f0}, {events=EPOLLOUT, data=0x7ffff52088f8}], 64, -1) = 2
write(1, "stdout is writable\n", 19stdout is writable
) = 19
write(1, "stderr is writable\n", 19stderr is writable
) = 19
close(3) = 0
exit(0) = ?
+++ exited with 0 +++

You know, I'm really concerned for the wellbeing of anyone in immediate vicinity around you, you really should be locked up in a cage.
>>
>>107501503
> But my code compiles and runs just fine though?
then why are you complaining nigger?
>>
>>107501508
I see.
>>
>>107501512
i mean, i'm not gonna say that rust is perfect, yes it has flaws, but that'd be one of the last thing i'd consider one.
sure it could have told you that maybe you meant to use deref, but that was pretty obvious anyway.
>>
>>107501552
Don't care tranny, I'm done wasting my time with this toy.
>>
>>107501560
> I'm done wasting my time with this toy.
now you understand why i say that it filters jeets, it's one of the lang with the worse learning curve out there and they abandon it pretty quickly.
though if you do get to a point where you master it, it's one of the most productive language out there.
>>
>>107501572
I'm already better at it than you will ever be and all I can say is that your dogshit shitlang sucks and you should kill yourself.
>>
>>107501575
>I'm already better at it than you will ever be
lol, is that why you were filtered by the compiler earlier and couldn't write a no_std hello world a few days ago ?
>>
File: mfw.gif (78 KB, 200x200)
78 KB
78 KB GIF
>I wrote a verifiably 0 panic epoll API that forces pinning and allows compiler to verify epoll referenced data lifetimes as it was intended to be done with rust
>it is ready to be used for a high reliability server where crashing isn't an option
>tranny who would defend .unwrap() to death tells me I don't know how to program
Sorry nigger, but I'll go use C now, because I'm really done this time and I'm never touching your demented language or your demented threads ever again. Remember to mention hello world one last time so I can have a better laugh at you grasping for straws.
>>
>>107501575
>and you should kill yourself
ooh look at who's le butthurt lol
>>
>>107501610
> but I'll go use C
> complains about unwrap that can be grepped or even banned with a macro
> somehow, segfaults that can't be grepped are fine.
lol
>>
>>107501626
I accept your concession.
>>
>>107501637
> can't write a no_std hello world
> waah it's the compiler not me
> i'm le big engineer, i wrote 0 panic epoll in rust, trust me saar
> still can't write a hello world
> i accept your concession
>>
File: pepe-eyeroll-eyeroll.gif (14 KB, 220x220)
14 KB
14 KB GIF
But I wrote and tested epoll for Rust in #![no_std]?
Of course, I almost forgot, you're just a demented cultist getting mad that neither you nor your shitty language works for my usecases.
>>
>>107501716
congratulation on figuring out hello world and the next most trivial thing.
> works for my usecases
what usecase ?
you are not even able to formulate it.
>>
>>107501716
why would I work for YOUR usecase though?
>>
File: 1738835796358036.png (1.86 MB, 1080x1461)
1.86 MB
1.86 MB PNG
>>107495978
because /g/ is nocoders
they participate in "language wars" as a proxy for culture wars
Rust represents woke soitranny liberals or whatever, so they hate it
C/C++ represents the good old tradchad days, so they stan it
it does not go deeper than that and that's why you rarely see actual language discussion, but only retarded misinformation like "Rust is slower than JS" or "Rust is mossad backdoor" or "Rust is not actually memory safe cause cloudflare crashed" etc

although there was a thread earlier this month with actual discussion and not a lot of screeching /pol/ lunatics. must've been a christmas miracle
>>
>next most trivial thing
Hold on just a moment tranny, you asked me to write epoll example in C because you're a nocoder who doesn't know how it works.
Then I didn't bother because 4cuck decided to clean itself up out of my face.
>>107501784
Because being a real programmer would be better for your mental health than being a night shift factorycuck that you are.
>>
File: file.png (856 KB, 927x797)
856 KB
856 KB PNG
>>107501807
>you asked me to write epoll
i literaly never asked you to, you must confuse me with another anon
>epoll
i've used it many times in the past, nothing impressive about it and its not even the best thing nowadays anyway, it does get you a lot for the simplicity of using it though, no one would be filtered by picrel.

> night shift factorycuck
i don't work in a factory, i'm a swe, i work remote, i'm however diagnosed with non 24h sleep wake disorder, my sleep schedules change on a day to day basis and sometime i work at night, this is also why i got a job where i could choose my schedules, i've been finishing my day as we were talking.
>>
>>107501865
>std::set for fds
oh no no no this is the nocoder who tells me I can't program
>>
>>107501898
this code is literaly 10 years old when i was still a student and learning about epoll, that's the first thing i picked up in my dir.
if it was recent code it'd be in rust.
and if it was somewhat recent code that's still c++ it'd be proprietary.
anyway, you focus on irrelevant bs.
>>
>>107501914
You're still a student and you learned nothing in past 10 years if you really think that your buggy mutt C++ code will fly when posted in vicinity of me.
>doesn't check for epoll errors
this is the nocoder who yaps about segfaults @ me lmfao
>>
>>107501921
>C++ code will fly when posted in vicinity of me.
i don't care if it fly by you or whatever, it was something scratch in less than an hour a decade ago when i was still learning the thing, i purposely used the oldest shitties code i could find.

point being, if i could figure out the basics when i was still a nocoder, anyone can.
>>
>>107501935
I accept your concession nocoder, I recommend you delete that code so you don't accidentally out yourself as a total retard to the next victim that you're trying to recruit to your demented cult, tranny.
>>
>can't write non-buggy epoll code in C++
>yaps some unintelligible gibberish about segfaults and figuring stuff out
>b-b-but rust is literally perfect and prevents problems
>b-b-but remember that time you were confused about this demented compiler's behavior though?
>noooo, I'm a real programmer I'm not a nocoder
lmao, I'm gonna continue using C just so it filters midwits like you who don't know how to read documentation and handle edge cases without a compiler generating an error if you don't. And it's really a shame to say that Rust documentation support is good, because it's completely pointless in a language for midwits where .unwrap() in production is totally not a bad thing kek.
>>
>>107501941
> hyperfocus on the most trivial bullshit that's irrelevant to the discussion.
the point was to show i've been using epoll over a decade ago when i was still a student, not my best uses of it, it was to show how long i knew about it.
you chose to hyperfocus on the most irrelevant shit that's anyway a moot point for the equivalent of a hello world as this was obviously not used for anything.
> muh no error handling
1. it was hello world grade to learn about it at the time
2. there is error handling you just can't see it because it's behind functions
>>107501979
> non buggy
it was working, it was not optimal obviously but it wasn't the point then
>>
>>107501984
Your every single post is hello grade, the code you posted can cause you to miss epoll events and lock up entre server you worthless clown.
>>
>>107501997
this was literaly a broadcast chat room as a hello world i did 10 years ago to learn about epoll, you are missing the point, it's not about it being good it's about showing you that i knew about it that long.
it being shitty was just an evidence that it is old and a way to being honest.

also the client_fds set was used as a way to iterate and broadcast.
and "muh miss epoll" events was irrelevant when i'd literaly just connect 2 clients to it with netcat at the time.
>>
File: screenshot.png (40 KB, 496x549)
40 KB
40 KB PNG
>>107502036
It's really a shame that picrel is what it takes to prevent a midwit retard clown like (You) from misusing such a trivial API.
And then you have audacity to tell me whether epoll is obsolete or not. Shouldn't you learn how to read first, ESLnigger?
>>
>>107486317
buy an ad, faggot
>>
>>107502048
>epoll obsolete
if you are on linux there are better things yes, from io_uring to ebpf or even DMA to the hardware if you care that much.

and again, you are missing the point.
>>
>>107502069
Post your io_uring code, I want to see what kind of expert is telling me that I shouldn't be using epoll.
>>
>>107502048
>>107502069
also on a sideline, you almost never need to use epoll directly in rust, you are better off using an async runtime like compio (that uses io_uring internally) or heck even tokio that uses epoll internally, the abstraction cost will be close to 0 anyway and then it's just a one liner instead of piles of boilerplate.
>>
>>107502080
buy an ad faggot, I'm not touching your panic ridden niggerbloat
>>
>>107502084
> complains about panic when you can literaly generate executable with 0 panicking code whatsoever
> hidden segfaults, no issues here
>>
>>107502077
see that's the thing, a oneliner using compio will outperform your meme epoll manual implementation.
also it is kinda similar to use in api.
>>
>>107502092
I cannot generate an executable with 0 panicking code whatsoever if I use tokio or compio though?
>hidden segfaults
Doesn't happen in my code because I'm not the nigger who needs rust.
>>
>>107486422

Oyy veeeey
>>
>>107502099
My program doesn't perform any allocations and doesn't spawn threads without me asking it to, but sure, bloat that has hidden allocations and might panic randomly will outperform my deterministic program, kek.
>>
>>107502100
>I cannot generate an executable with 0 panicking code whatsoever if I use tokio or compio though?
alright fair enough.

i've never done a no_std io_uring to be fair, but it's a somewhat simpler api than epoll from what i know last time i looked at it, i think you'd have fun with it be it c++ or rust.
it consistently beats epoll in benchmarks be it in throughput or cpu usage.
it is also a lot more versatile because you can use it with write and all kinds of fd's so you can literaly do fs, io and other stuff with it as well if you want.
>>
>>107502122
Yes, I know that you're a nocoder, what else is new?
>>
>>107502113
dynamic allocation and thread spawning has virtualy no costs if it is only happening at program startup.
>>
File: >.jpg (171 KB, 840x839)
171 KB
171 KB JPG
>>107502126
>
>>
>>107502123
you know there is more to engineering than writting meme hello world to tests some syscalls?
i've used epoll once profesionally and that was in c++.
i've rewritten software that was using epoll in rust, and even the most basic implementation using tokio (so no manual epoll bullshitery) outperformed it.
most of the time cniles will not bother to do multithreaded epoll, tokio will do it without you even having to think about it.
and if you use compio instead of tokio that's even better.
>>
>>107502136
you know that i'm right.
memory allocation is costly if it's in your hotpath.
if you do it only once at program startup it doesn't matter whatsoever.
same things for spawning threads.
also if you looked into it you'd know that tokio doesn't keep spawning threads, it uses a threadpool that's spawned only once.
>>
rustling clown thinks thread synchronization is free lmao
>>
>>107502163
> thinks thread synchronization is free lmao
entirely up to you to do, you don't have to do synchronizations, especialy if you design your software properly.
and multithreading with well scoped synchronization will outperform single threading in most cases.
>>
>>107502177
Using tokio or compio means I don't even get to design my software, you worthless disingenuous nigger.
Turns out that in the end, the rust is for jeets who can't program.
>>
>>107486317
Prisma balls
>>
>>107502237
> I don't even get to design my software
no, it means you can avoid wasting time in boilerplate and actually focus on building what matters.
if for some reason you ever need to do it manualy you can always do it later anyway.
you know prioritizing what matters most first, then optimizing things latter?
anyway, the most basic compio rust code will outperform 99% of codebases that uses epoll.
so it's not even about performance at that point just say that you are having fun using epoll.
and even, if you do use epoll manualy generaly it's a trivialy small part of your codebase and just an entry into other functions, so it's kinda irrelevant whether you go with the boilerplate route or let your async runtime do the boilerplate for you.
>>
>>107502278
Okay jeet, but I'm not hardpressed to build yet another worthless and bloated webapp using the latest async framework that you still refuse to buy an ad for, go there >>>https://4chan.org/advertise
>>
>>107502237
> rust is for jeets
you admited yourself being frustrated by the compiler, jeets will abandon the language well before being able to write anything with it, the learning curve IS annoying.
>>
>>107502295
> async is only for webshit
what kind of retardation is that exactly ?
>>
>>107502302
>>107502295
also it compiles to nearly identical code anyway, and a lot more collective engineering time and focus has been put into libraries than you'll ever put on your shitty half assed epoll implementation.
>>
>>107502297
I already wrote enough code to learn that rust isn't worth my time.
Then some jeet also told me to throw my code away and use some panic ridden niggerbloat that might crash my server at runtime unexpectedly.
>>107502302
>> async is only for webshit
yes it is, async is not zero-cost and it's bloated, by design, it requires more memory than just not using async, usecase for using more memory?
>>
>>107502308
>nearly identical code
lol, lmao even, the funniest part is that you act like you know my usecase
>>
>>107502310
>I already wrote enough code to learn that rust isn't worth my time.
well you are entitled to your opinion, i wish you the best with whatever you choosed to work with, but why are you still there then ?
> crash my server at runtime unexpectedly
literaly never happens.
and i'd trust more the possible panic branches than the possibility that you have some segfault somewhere.
also you can do no panic rust anyway and have very little amount of code that you realy have to check for ub / out of bounds etc instead of the whole codebase.

> async is not zero-cost
that's false depending of your runtime.
> bloated
you can make your own async runtime in like 30 sloc
it'll compile to nearly the same thing (if not the same) as using epoll / io_uring manually.
> usecase for using more memory
shipping something that will perform 99% as well (and probably more since you will do multithreading since it's not longer a pita, and use io_uring)
in days / weeks instead of months / years.
you can always make it better latter anyway.
and yea, even if we scratch async off, i'd use manual io_uring in rust any day before doing it in c++.
>>
why are jews always the main force against rust?
>>
>jeet thinks my usecase allows for multiple threads
>>
>>107502353
>jeet thinks my usecase allows for multiple threads
1. you have never stated your usecase so don't be surprised we make assumptions
2. you don't have to use multithreading, it's entirely optional.
>>
>>107502360
I will never be not surprised that you keep assuming that I'm a jeet like you who's trying to build another bloated webapp on a niggerbloated async framework for jeets who can't write their own code kek.
>>
>>107502370
>another bloated webapp
i don't do webapp, i do system programming.

but anyway, TcpListener::bind() and TcpSocketStream::connec() will always be a lot nicer than 200 lines of boilerplate.
and for io bound shit it doesn't matter much anyway.
if you are realy gonna spend cpu time it's not gonna be on i/o and rust can match if not outperform rust because then using multiple threads or even gpu make sense and it's a lot less of a pita.
>>
>>107502394
match if not outperform cpp*
anyway goodnight, see you later if you are still there.
rust or not i can only recomend you to check out io_uring and ebpf you'll like it for sure.
>>
>>107502394
Sure thing rajesh, dealing with half-baked meme implementations of basic things is so fun https://github.com/rust-lang/rust/issues/55614 when you have better things to do.
>>
File: rewrite-in-rust.png (285 KB, 642x762)
285 KB
285 KB PNG
What is it with the memory leaks when people write code in that language?
>>
>>107502411
you complained about malloc jemalloc earlier, you do know that Tcp(Socket)Stream has more implementation than just the std, there's tokio's, compio's, smol, async-net etc...
if you use async you are generaly not gonna use the std net stuff anyway.
>>
>>107502419
Rajesh over here is telling me that dynamic memory allocations are zero-cost so it might have something to do with that.
>>
>>107502419
nice bait, but the cloudflare thing was unrelated to rust, sorry.
>>
>>107502427
>there's tokio's, compio's, smol, async-net etc...
And I still have to write my own because everything you listed and forgot to list is retarded nocodeshitter niggerbloat that I will never use.
So this boils down in whether I'd rather write it in C or Rust and the answer is I will do it in C.
>>
>>107502429
>dynamic memory allocations are zero-cost
i never said that, i said that it won't affect the performance of your program during if you only do it once at startup, which is a fact.
and post hands or stop using brown terms retard
>>
>>107502435
> And I still have to write my own
well have fun doing that.
my guess is that you have no real usecases, you focus on things that don't matter and can't point to a specific issue with them that actualy impact you.
>>
File: rust.png (232 KB, 1055x607)
232 KB
232 KB PNG
>>107502436
>the only cost is performance, there are no other costs
kek
>>
File: screenshot.png (13 KB, 910x124)
13 KB
13 KB PNG
>>107502441
You called yourself a system's programmer so you should know though?
Or are you just a npm level midwit who cannot solve any problem without cargo add someone else's solution?
>>
>>107502443
no, it will literaly not affect performance during runtime.
and don't pretend like memory allocation is a thing specific to rust.
>>
>>107502436
>>107502443
Doesn't using 16GB+ of ram have a cost on performance?
It's just a shame ram now cost a lot.
>>
>>107502449
>solve any problem without cargo add someone else's solution?
i got enough things to do to autisticaly focus on things that don't matter.
and you can always do it manually if it ever becomes a problem, you know, your networking boilerplate should be separate from application code anyway.
>>
File: file.png (34 KB, 1152x193)
34 KB
34 KB PNG
>>107502457
don't pretend like you have to use more ram in rust than you do in c, it's entirely up to the dev.
also i don't care i can afford it. (chf price)
>>
>>107502450
>there are no other metrics besides performance
kek
>>107502463
>things that don't matter
kek, I had enough of your jeet cope, go write more memes so I can laugh as hard as I did at >>107486317
>>
>>107502472
>there are no other metrics besides performance
my point is that you can match all metrics if you care.
but i rather focus on building the shit first, and then maybe spend sometime for the last 1% difference that *may* exist because of abstractions.

i've seen enough suboptimal c++ codebases that couldn't even be touched because of how much of a mess the language is so they were stuck in that state pm forever.
>>
>>107502472
if you think >>107486317 (OP)
is any form of win you are a retard.
of course calling js from js is gonna have less overhead than calling another lang from js that's basic FFI knowledge.
>>
fundemantaly rust is a language that gives you the choice to handwrite things or not, to use abstractions or not (ie traits) and to use metaprogramming or ot.
c++, you are stuck with your shitty single half baked choice, no nuance.
they can both performe the same.
it'll be less work to outperform c++.

rust wins in my book.
>>
>>107502483
I think that OP is a loss. Retards like you who cope that good software cannot be written without Rust write slow and bloated slop.
>>
>>107502531
>gives you the choice to handwrite things or not
ok jeet, so why do you keep coping so hard about me writing things myself? Tired of me finding bugs in your shitty compiler already and want me to go away? Lmao. Don't worry, I will, because I am not going to be a beta tester on this one.
>>
>>107502558
> good software cannot be written without Rust
i never claimed that, amazing software have been written in most tech.

it's more that you can match c performance with rust, but i'll be a lot more fun to write, and you'll be a lot more productive.
and besides matching perf, because it is more productive, you'll also have more time to actualy surpass the performance, as time you'd have wasted on boilerplate is time you can spend on optimization of hotpaths.
>>
>>107502566
>me writing things myself
i have no issue about that, i'm just telling you it may not actualy give you the extra performance you think it does, you should actualy benchmark it, and i'm curious about your results honestly.
> me finding bugs
what bugs, you haven't found a single one.
and if you are the hello world guy, the issue was you.

> I am not going to be a beta tester
cool for you, but the language has more than enough proved that it is production ready imo.
heck it's in the kernel now, as much as i think mixing codebases is cursed it seems to be going well.
>>
>>107502596
>match c performance with rust
Have yet to observe this.
>it may not actualy give you the extra performance
Except it does, jeet.
>>
File: file.png (215 KB, 1497x491)
215 KB
215 KB PNG
>>107502617
>Have yet to observe this.
tons of cases where software written in rust outperform prior C equivalents (and often are also nicer to use).
> Except it does, jeet.
i'd like to see evidence of that.
i'd actualy bet that your custom implementation is slower.
i've literaly seen rewrite with tokio (which isn't even the fastest runtime out here) outperforms codebases using epoll in the real world and that was i/o bound stuff let alone cpu bound stuff.

heck even for webshit backend benchmarks this is the case.
and half of those are tokio and not compio based.
>>
>>107502640
>>107502617
also if you didn't know drogon has for long been considered one of the highest performance cpp webserver.
>>
>>107502662
>>107502617
also your meme handwritten impl is not gonna beat things similar to drogon in engineering time.
even if you don't do web backends, there are similar libraries for shit that's not web.

my point is, even the best cpp webserver gets mogged by rust stuff that probably required half as much engineering time.

your meme implementation isn't gonna beat them, especialy since you still think epoll is better and refuse to use multithreading and say it's slower as an excuse to not have to do it because it's a PITA.
>>
>>107502680
anyway i've seen many c++ devs using shody workarounds to avoid doing something that's a pain in the ass to do in cpp and is generaly just a one liner in rust.

many gains in performance are not because of some meme hot code path function but just overall architecture of the whole software and or infrastructure, and rust tends to allow for solutions that'd just take too much effort and time in cpp and is thus often skipped in codebases.
>>
None of that makes you a woman though
>>
>>107502741
Thank God!
>>
>>107502692
My C code does more and is less lines than what I have in Rust though?
>>
File: 1764430607209755.jpg (188 KB, 1156x1156)
188 KB
188 KB JPG
>>107502640
>Jeet thinks that by server I mean HTTP
kek
>>
>>107502827
No i don't think, but that was just an example, http fundamentally is tcp with extra steps and is a good example, the underlying fundamentals are the same. And again, my bet is that your naive handmade implementation will perform worse.
>>
>>107502925
My bet is that you're a jeet who's mad that someone more intelligent than you just said that rust absolutely sucks.
>>
>>107502968
Lol, post code.
Actually you know what, let's define a competition, make c / c++ code for a tcp replay, ie clients connect to it, send a payload and receive it back.

Then I'll do the same using compio, then we can compare performance and simplicity of the code, which can handle the more r/s and which does the most gbps.
Let's say by the end of the week.

Does that sound good to you?
>>
>>107502991
not posting more than >>107502048
>>
>>107502999
I accept your concession.
>>
>>107503003
Glad I could help you, jeet.
>>
>>107503010
Lol, just admit that you are scared that you will lose.
You are the jeet.
>>
>>107502999
Why are you using that and not mio? Are you literally retarded?
>>
>>107503042
Probably because mio API is absolutely jeeted?
>>
>>107503077
Uh, ok. How do you plan on running this code on Windows or even fagOS?
>>
>>107503220
I'll worry about it when that happens.
>>
>>107503235
So instead you'll reinvent mio because you're literally retarded? You can't even use pin correctly. kek.
>>
File: 716INbRNI7L._AC_UY1000_.jpg (82 KB, 974x1000)
82 KB
82 KB JPG
>>107486422
He's wearing these
>>
>>107503243
No, instead I'll write code for platforms that aren't used by jeets and faggots.
>running a server on windows
nice cope, jeet, my binary code is not going anywhere near your LLMslop ridden jeetOS
>>
>>107486378
A database ORM is a retarded concept in the first place.
>>
>>107486686
If a language has to compensate for your stupidity, you'll never write any code worthy of being included in any serious performance benchmark. I don't care if some troon's 0.5 MAU "time to dilate" app is 10% faster because it switched to rust.
>>
>>107503342
>If a language has to compensate for your stupidity
This. Real men only writes in assembly. Only incompetent programmers need compiler to track types, stack frames, function arguments, constness etc.
>>
>>107503371
funny how you didn't mention lifetimes since rust is really bad at those
>>
>>107503380
Because 99% or compilers do not deal with lifetimes.
>>
>>107503384
Rust is the 1%, and you forgot that somehow, troon.
>>
>>107503390
Yes. And I was talking about programming in general, not just about Rust which is the 1%.
>>
>>107503396
So you're just being disingenuous in general rather than as a rustroon? Very brave.
>>
>>107503406
No, I'm 100% sincere.
>>
>>107503586
Then you're a total retard, because languages like C focus on performance and simplicity rather than some spook like security.
And inline asm is so easy in it that there's no reason to use asm over C.
Same cannot be said about other languages that make everything so clusterfucked that it becomes prohibitively more and more impossible to understand any of it.
>>
>>107503621
>simplicity
>types, signatures, qualifiers, arrays and all the rest of bloat to compensate for your stupidity
>can't even mutate stack pointer or anything useful without triggering UB
Nice training wheels you got there.
>>
>>107503736
>>can't even mutate stack pointer without triggering UB
works on my machine, not sure what you hallucinated
>types
kek
>sig...
never heard of any of these things before
>>
>>107503380
and yet, it still works wonderfuly.
it having false positive is 1000x better than false negs.
>>
>>107504451
Except I had to waste my time marking lifetimes for false negatives to stop happening
>>
>>107486317
>javashit faster than rust
not a rust tranny but this is bs
>>
>>107504488
/g/eets don't know what a ffi is and the overhead of using one lol
>>
>>107504465
Liar, you only use a lifetime to clear a false positive.
>>
>>107504532
ok nocoder, I'm sure you know better than I do lmao
>>
>>107504538
i literaly do yes.
you have never built anything real in rust, the issue is you.
>>
>calling wasm to js and js to wasm is slow
wow, it's almost like the thing I've been complaining about forever. In an ideal world there would be zero js involved if you wanted to (seriously) use wasm. Jewduke is such a faggot and I can't believe this shit thread is still up.
>>
>>107504724
this
we can close the thread now
>>
File: screenshot.png (24 KB, 1366x768)
24 KB
24 KB PNG
>>107504672
Good morning sir.
>>
>>107504765
> can't write a hello world
> good morning saaar
This is was a positive retard, kek you don't even understand the difference between a false pos and neg...
>>
>>107504765
>>107504893
> make broken lifetime
> complain it doesn't build
> remove it, it does
Wow.
>>
File: screenshot.png (8 KB, 1366x768)
8 KB
8 KB PNG
>>107504893
>/g/eet doesn't know how to read diffs
I removed lifetime information and it started compiling buggy code, you worthless /g/eet. Yes, it is (You) who is the /g/eet, not me.
>>107504914
>/g/eet doesn't understand the screenshot
I'll be brief, I wrote buggy code to test the lifetimes, and Rust stops it from compiling. I removed the proper lifetimes, and Rust allows buggy code to compile.
This language is worthless, your (safe) rust code likely has bugs. You're a midwit and nocoder and I'm done here.
>>
>>107504765
Also you just confirmed that you, the hello world filtered fag and epoll fag are the same person, we already knew but now you can't deny it.
We will always laugh at you.
>>
>>107504931
It's not a bug you are just not understanding what you are doing. Which is not surprising considering you couldn't write a fucking hello world and blamed the compiler for hours until someone showed you how trivial it is to do.
You have no usecase, but you like to larp that you do and are le big engineer saar.
You are not an engineer.
And you are brown.
>>
>>107504969
>jeets filtered by lifetimes and the borrow checker
god i love rust, never have to deal with them
>>
>>107505000
you never have to deal with them because youre unemployed.
>>
>>107505108
If that idea helps you sleep at night.
You still got filtered for hours by a hello world and nothing you can say will change that lol
>>
File: c++-vs-rust.png (437 KB, 726x1207)
437 KB
437 KB PNG
>>107505171
its another anon
me, i wouldnt touch your dogshit lang with a stick even if i was paid for it
>>
>>107505195
Nope, it's him, look at the jera.rs file, same thing as the broken hello world in the old thread
>>
File: rust-jobs-shrug.png (70 KB, 523x720)
70 KB
70 KB PNG
>>107505247
i meant:
>im another anon
and yeah, if a hello world is problematic
you got really really really bad interfacing in your lang

dogshit interfaces arent a selling point, to the contrary, who would have thought...
>it filters jeets
rust has been made with jeets and jeet-accessories in mind though
another way how its a filing product
>>
>>107505294
*failing
>>
>>107505247
>>107505308
im currently looking up rust jobs with the expectation the situation changed
it did.

and holy shit is it a bloodbath
why do you shill rust when the reality is that its pretty much dead?
and why are you so annoying while doing that?
>>
>>107505247
>>107505379 cont.
cobol has more offers than rust.
>>
>>107505294
A hello world isn't problematic, it was pure skill issue, he tried to do a no_std hello world and blamed the compiler for hours, and then someone shared a repo to show how to do it and yea it takes like 1 minute at most.
>>
>>107505418
fair enough
>>
>>107505379
ad populum
Nice retardation, most jobs are for webshit what's your point.
Didn't prevent me from using it professionally the last few years.
Most jobs posting are fake anyway.
>>
>>107505432
You can read this thread if you wanna know more.
>>
>>107505438
>denial
>anger
>bargaining
>depression
and
>acceptance
all in one post

thats a WR time you might have here, anon
>>
>>107505470
>>107505432
i meant to quote this >>107501487
>>
>>107505470
im not sure if i wanna
your explanation was pretty complete, despite it being very succinct
>>
>>107505473
Rust postings don't stay open for long because people actually want to do it and also a rust engineer is gonna be a LOT more productive than any cpp dev so they don't need as many.
You are missing half the picture, there are c++ posting opened for sometime even over a year, no one wants them
>>
>>107505601
thats a lot of assumptions
even for highly concentrated copium
>>
Rust postings don't stay open for long because Indians spamming the inbox with their CVs for a no-requirement job takes down recruiter's email server.
>>
>>107506089
That would make posting stay open for longer though.



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