c++ bad
Rust very good but ran by troons
waht do
It's All Fucked Shirt $22.14 |
Shopping Cart Returner Shirt $21.68 |
It's All Fucked Shirt $22.14 |
c++ bad
Rust very good but ran by troons
waht do
It's All Fucked Shirt $22.14 |
Shopping Cart Returner Shirt $21.68 |
It's All Fucked Shirt $22.14 |
Make your own Rust but with blackjack and hookers.
Use Rust, but pay no attention to the people making it.
I actually don't mind people who deny themselves productivity tools just because 'le bad'
It's a pretty good moron filter, seeing who wants to just go and work versus stay loyal to what some virgin on the internet told them to think.
its about not supporting things you dont like.
Not everyone is a cuck rat
Groomers
>its about not supporting things you dont like.
Hello /misc/Black person bot #84949692
Go support things you hate then complain about the things you hate 🙂
Fricking morons support things they hate then complain the world sucks
>le productivity tools!
It's extraordinary how that was what you got after that comment.
that's hitching a ride on a hearse
Rust is made by white males.
The joke is that straight white men created it.
Use Rust, but know that u will never find professional use for it.
I beg to differ. I don't work in Dev (yet) but in support of Devs and clients. I have seen people use Rust in my current and previous job and are very adamant on using it.
However, these are web developers so... this isn't 'everyone' but yeah, a good chunk of the market these days considers it.
C++ is a failed attempt at improving on C. Rust is a failed attempt at improving on C notable only for attracting a disproportionately large number of troons.
If I had to choose I'd go with C++, but really just use C.
>no data structures
kek ok
Rust can’t even do linked lists. What data structure can’t you do in C?
It's not about what data structures you can or can't *do* in C, it's about what data structures C *has*. None. You can *do* anything you fricking want in it, that's not a selling point, that's just a basic feature literally every language is expected to have.
>Rust can’t even do linked lists
Kek, is this real? I'm never learning rust when D exists
>it's about what data structures C *has*
Just use gnulib
> Kek, is this real?
Any data structures with circular references cause the borrow checker to throw an error
>Just use gnulib
Fair, gnu is pretty based. But still, without subscript overloading, library-provided data structures are fugly as shit.
>Any data structures with circular references cause the borrow checker to throw an error
KEK
And you can't even get around this in any way? Not even with unsafe?
Holy frick, rust isn't even a real language
>And you can't even get around this in any way?
I've never tried but I'm pretty sure you can create circular references with std::sync::Arc.
You're supposed to use std::sync::Weak if you want a circular reference for something like a doubly-linked list.
You can't just use references directly in a linked list in rust. You need to use ref-counting pointers to appease the borrow checker.
>Not even with unsafe?
You can do it with unsafe.
Wait then what's the problem?
Circular references complicate memory safety in any non-gc language, what's wrong with forcing the developer to take those complications into account when they're writing the data type, when they're just going to have to take it into account eventually either way?
>Wait then what's the problem?
Typically in C++, you'll have something like:
template <typename T>
struct linked_list_node {
linked_list_node *next, *prev;
T val;
}
The equivalent of that in Rust would be:
struct linked_list_node<t> {
next: &mut linked_list_node.
prev: &mut linked_list_node,
val: T,
}
The rust compiler will give you an error about trying to put references in a struct because the references need to have an associated liftime and that can't be automatically deduced from a struct.
You can work around this with lifetime parameters but those aren't good for general purpose use.
I've never actually written a doubly linked list in rust (or outside of a university course), but I think this should work:
struct linked_list_node<t> {
next: std::sync::Arc<std::sync::Mutex<linked_list_node>>.
prev: std::sync::Weak<std::sync::Mutex<llinked_list_node>,
val: T,
}
>are a brainlet for doing whatever you're trying to do
If you ever worked a real coding job, you'd know that basically everyone writes some brainlet code once in a while.
When you really need to get a project done by a deadline or you're just kinda burned out, it's easy to just write something that works but isn't written well. This is where you get things like unnecessary copies and allocations.
>I've never actually written a doubly linked list in rust (or outside of a university course), but I think this should work:
Ok, I'll admit that's much more verbose. But it seems justifiable, is that template mess not an accurate description of exactly the memory safety complications that circular references *always* introduce in *any* language? I'd imagine the only reason the C++ example is so much simpler is because C++ doesn't care. As long as you can actually *do* it in Rust, and you can do it idiomatically, I'm still kind of not seeing the problem.
>When you really need to get a project done by a deadline or you're just kinda burned out, it's easy to just write something that works but isn't written well. This is where you get things like unnecessary copies and allocations.
Ok fair.
At least they're just extra work, and not memory leaks, or worse, use-after-free errors
>I'm still kind of not seeing the problem
I don't think there is a problem beyond the fact that it's tedious to keep typing .lock().unwrap() everywhere.
I haven't been using Rust that long, but the only thing I find potentially troublesome is that std::sync::Mutex isn't recursive, so if you're doing some really complex code on a cyclic graph, you could end up in a single-threaded deadlock.
>I think this should work
Oh I should have wrapped the next field in an Option<>.
Hope you like typing .unwrap().lock().unwrap().
The one weird thing about this linked list approach is that to remove the node you're currently on, you'd need to potentially lock the current node, the next node and the previous node. Multiple mutex acquisition has a risk of deadlock and I'm not sure there's an easy way around that here.
rust has double linked list in its standard library implemented with unsafe (duh, doing manual memory alloc too) and it works just fine.
all unsafe code branches are interfaced through safe code that ensures you won't get garbage. im not sure why IQfytards that have never used the language keep peddling opinions as fact
>Kek, is this real
no, linked lists are allowed when using unsafe blocks.
refcell
>Rust can’t even do linked lists.
use std::collections::LinkedList;
>What data structure can’t you do in C?
HashTable.
lol
Do cniles REALLY??
Why would you do this when you could just operate on everything as unsigned char*
Don't tell me you unironically reimplement basic data structures slightly too complex to be included in stdlib, such as variadic trees or graphs, every time you write a new program
>Why would you do this when you could just operate on everything as unsigned char*
The same reason C has types other than unsigned char*.
jej
cbros…
lmao
I doubt an average CS101 droptout cnile shill even knows what HashTable is.
OH NO NO
MAN DOWN MAN DOWN
Reset your worldview. If you're at the stage where you're doing something with your life, those algorithmically induced brain worms are holding you back,
Make a document and rebuild your worldview from scratch with only statements you can substantiate, no headlines, no pepejaks, real research or don't write it down. You won't be bothered by trans people after that.
>you won't be bothered by trans people after that
Disagree, went to college and graduate school, both for CS. I remain bothered by trannies and despise them more than I did 10 years ago
But did you start from scratch? From my experience, hate is bloat.
They're not gonna let it go so long as it tickles their dopamine signals to say 'troony' since not going outside destimulates them to that point. It's over for 'em.
When did you realize you were trans?
That's sad to think about. You'd think people here would apply the same ideas of 'bloatware is bad and I'll be better off with something unbloated' to their life and recognize things like transmisia are just bloatware for the mind.
Wrong, hate is cutting bloat.
Troons are bloat.
They're complications.
They're confusions.
They're full of hate.
And after a while you realize that we're validating the wrong feelings they have. You see, they believe they're born in the wrong body but they're also suicidal. You want to go back to first principles, start from scratch? Why did we choose to play along with their delusions instead of encouraging them to kill themselves?
I'm serious here. What unwritten assumptions and value judgements are you making by encouraging them to live a lie?
Give suicide a chance.
almost nobody even cared about troons 10 years ago
back then even liberals didn't care about them
>Make a document and rebuild your worldview from scratch with only statements you can substantiate, no headlines, no pepejaks, real research or don't write it down. You won't be bothered by trans people after that.
not true. They are so annoying
>IQfy iq is below 100
Rust is dependent on LLVM which is written in C++; same apply to C, the digital infrastructures are built with C++.
If you got filtered by C++, then try something simpler but don't expect the same power and freedom you get from C++.
C++ is an ancient, dated garbage full of legacy baggage. Rust is what C++ wants to be but can't.
Yet rust still has a hard to read syntax, more abstractions than c++ and just as many pitfalls when you use unsafe.
>LLVM is written in C++
>Rust uses LLVM
>therefore ????
what the frick is even your point? do you actually understand anything about compilers and language design or do you genuinely think "thing written with different thing" is some incredible eye opening revelation?
>IQfy iq is below 100
yeah and you're helping to lower it apparently
Are you still programming in assembly? No, but C++ compiles to it. Hmm. By your logic you should be.
Are you still programming in lightswitches? No, but machine code interprets to it
Exactly. Which is why I don't bother with C++. I also don't bother with lithography.
>Rust very good
So use it.
>run by troons
Suck it up.
Just use C++ without OOP.
I didn't use rust for a long time because it was advertised as the cure to all software problems.
Rust will magically prevent any CVE from being possible and you don't need to put any thought into threading code anymore.
Anyone who's actually spent any time programming knows that's all bullshit.
The fact that a lot of noob questions about rust programming are responded with "you're programming wrong" didn't help.
After I actually tried rust, I discovered that it was like C++ except without exceptions and overloading (my most hated features).
They also fixed the issue where any slight error in a template generates 1000 lines of cryptic error messages.
The borrow checker is also nice but it can be kinda tricky to work with and often ends up adding a lot of unnecessary mutexes and ref counting pointers everywhere.
The move-by-default model is also quite nice.
>move-by-default
Ew what the frick? Why?
Seems like pass-by-reference by default would give you really similar semantics with much less potential overhead
here's the explanation from one of the developers. the short version is "explicit references are better than implicit references"
>As for why an ownership transfer (copy or move) and not a borrow (const-ref): rust has embraced explicit references of some sort -- either as first class types or at least parameter qualifiers -- for most of its life, mostly to keep the mental model clear: if you don't mark the presence of an indirection, you have to either mark its absence (which is .. weird) or else just guess at it / argue with the compiler's inference about it, which violated our desire to make costs clear and controllable.
>you have to either mark its absence (which is .. weird)
Seems mostly reasonable but why not just do this?
Honestly sounds based.
You could make an attribute, call it "copy" or "blit"
>use C++
>any assignment without using std::move() will call the copy constructor slowly eating your performance every time you forget
>forgetting to delete the copy constructor on a non-copyable type (e.g. a unique_ptr type thing) will cause a horrible bug
>use rust
>if you assigned a type and forgot to copy, the compiler tells you that you made a mistake
>you have to implement a copy constructor if you want one
This just reduces your code review burden so much. I've been writing C++ professionally for years and I'm tired of how painful it is to review.
>Rust can’t even do linked lists
You can make a linked list in Rust. You'd just need to put each linked list node in an Arc<Mutex<>> (you could use an RWLock as well).
It's certainly a source of minor inefficiency but most code doesn't do enough pointer movement for that to matter.
I suppose sketchy multithreaded code in C wouldn't be compatible though.
>>use C++
>>any assignment without using std::move() will call the copy constructor slowly eating your performance every time you forget
Copy elision.
Learn what it is.
Sounds like rust is just run by boomers sesu denpai
>Copy elision
It's not going to save you everywhere. The compiler isn't omniscient; there are plenty of cases where it'll still copy the object if you just never use std::move() anywhere.
Those tend to be the cases where you either want copies or are a brainlet for doing whatever you're trying to do with a copy constructor and not in a more sane way
I've always just used python. It just works. Yeah the switch to python 3.10 has been a chore but it's actually the best time to start a project in python.
Wait for Hare.
>No generics
LMAO
not related to thread but can you tell me a use case for generic types (data structures from stdlib don't count)
the only generic thing i ever did was to implement generic functions
>(data structures from stdlib don't count)
Name one reason why not
I don't need to implement them myself
But what if there were ever a data structure you did need to implement yourself
Such as:
An associative variadic tree
was thinking more about writing applications where your data would be too specialised
>fn main() void
stopped reading right there
Use lisp.
>Use lisp.
In Haskell this is just
lisp . use
you also breathe the same air as troons. probably a good sign that you should stop breathing
Ok
I don't understand this
Is c or rust better
Simple answers only. The minority wins because most of you are moronic
Better for what?
c because it's closest to bare metal
it's not bloated shit like c++ and not made by trannies like rust
>Rust very good but ran by troons
Holy fricking shit, no one forbids you except your mentality for using new technologies such as rust. Go back to using oldass languages if that's your fetish
pure C99, you fricking zoomer homosexual
die out rust cancer
learn python and git good at c++ homosexual
the linux kernel is written in C
speaks for itself
Vale.
>dev is gamer/game maker
>doesnt have twitter
>doesnt have CoC
>isnt troon (yet)
10/10 certified chudtastic project.
But that is wrong
Encouraging people to commit suicide is bad
No it's not. They think about suicide quite a bit and it solves the "wrong body" religious mumbo jumbo they believe in. Maybe they'll be reborn as the correct gender. Why wait? Do it now.
Encouraging suicide is bad unconditionally because death is bad unconditionally and life is always superior
Nah, there are many situations where death is the superior choice. You're trying to validate one set of feelings they have and I'm validating the other. I support their decision to commit suicide, it's better for both of us. If one believes they were born in the wrong body, one must believe in a soul at the very least. And since a soul is immortal, they just have to roll the dice again and hope the next roll gives them an actual body that conforms to their idea of themselves.
>Nah, there are many situations where death is the superior choice.
Nope, there are literally none.
Torture victims should be forced to keep living.
I hate Hitler but he shouldn't have killed himself
etc
You have no basis for this belief. I have a basis for supporting their suicide. They already have those feelings, and those feelings seem more coherent and understandable than forcing everyone else to participate in their delusion. It would cause far less friction for others and themselves if they ended it.
I do support them becoming the gender they want to be. And if they believe they were born in the wrong body, then I think they should try again for the correct body, one that conforms to their self-identity. Unfortunately they are cowards and lack the courage to do this, so they instead endeavor to make life intolerable for others. Their suicide ideation is valid and conforms to their own beliefs.
So they should do it.
>You have no basis for this belief.
i have as much basis as you do for yours ultimately. for your stated basis is that "it's better for both of [you]." that "they just have to roll the dice again," which is to say, if there is something they want, they "have to" pursue it. in other words, you believe there's some intrinsic good in benefit to people. well, i believe there's intrinsic good in life. that's no more ridiculous or outlandish than believing in intrinsic good in benefit to people
There is no intrinsic good in being imprisoned in a body that is not your own to the extent you can't enjoy a full measure of life. Again, I am not supporting their death, I am supporting their suicide and opportunity at rebirth.
>There is no intrinsic good in being imprisoned in a body that is not your own to the extent you can't enjoy a full measure of life
i disagree, because that assertion is based on your stated belief in intrinsic good in benefit to people, which i do not accept. you think there's no intrinsic good in forcing someone to live a life they can't enjoy, because they can't enjoy it. i assert their enjoyment is beside the point, and it's better they should simply live, because life, not enjoyment, is the intrinsic good in and of itself.
It sounds suspiciously like you're arguing that they should play the hand they're dealt even if it's a shitty one. OK, their biology is strongly opposed to what they stated identify as so they should just suck it up and play the hand they're dealt instead of defacing the vessels they were given in an act of defiance against nature.
Their joy at pretending to be the opposite sex is beside the point, they were given the life of a man so they should just be a man.
>OK, their biology is strongly opposed to what they stated identify as so they should just suck it up and play the hand they're dealt instead of defacing the vessels they were given in an act of defiance against nature.
>Their joy at pretending to be the opposite sex is beside the point, they were given the life of a man so they should just be a man.
I disagree, because if I were to concede that, I'd be accepting the notion that there's any more general intrinsic good in what's natural, and I don't believe that. I only believe in specifically an intrinsic good in life over death. I fail to see the intrinsic good in other natural things
It doesn't matter what you believe though. I'm talking about their own stated beliefs. They believe they were born in the wrong body, they want to kill themselves. Being born in the wrong body has a spiritual dimension. Somebody or something fricked up, clearly; so to rectify that, they can choose another life. Let them manifest in a manner of their choosing. If they be women, then let them come again as women.
You can say there is intrinsic value in life, I'm not arguing against that. I'm arguing there is intrinsic value in choosing another life - apparently their beliefs are strong enough to force others to participate but not enough to enter death's gate and emerge gain correctly formed.
I believe there's an intrinsic value in life *over death*. This obviously precludes dying to live again, as equivalent in value to simply dying.
>it doesn't matter what i believe
Oh, but it matters what you believe, does it?
You're not speaking from their own stated beliefs. You can't. No one can but them. You're speaking from your beliefs overlaid upon theirs. This is no more novel, and certainly no more honest, than simply speaking from your own beliefs alone.
It matters what the troons believe. Again, they often say they wish they were dead. I'm telling them that their feelings of suicide are legitimate.
You're not speaking from their own stated beliefs. You can't. No one can but them. You're speaking from your beliefs overlaid upon theirs. This is no more novel, and certainly no more honest, than simply speaking from your own beliefs alone.
I can just copy-paste that, because you didn't address it in any way just now, so it still works just as well.
The opposite is true. Troon enablers have a problem with death so they encourage them to live and suffer. Almost no one encourages them to commit suicide; anyone who tries is vigorously shouted down by self-righteous pseudo-religious vitriol. I'm encouraging them to explore their feelings and exercise their options in a way yourself and your cohort have been discouraging at all costs.
You want them to live as freaks because it will give you a sad if they don't suffer along with you. Misery loves company.
>I'm encouraging them to explore their feelings and exercise their options
No, you're encouraging them to explore your interpretation of their feelings and exercise your interpretation of their options.
No one but them can truly understand their own feelings and what their options are. It's useless for us to try.
It's better for us to simply be honest about our own opinions on them, and understand those thoughts as entirely divorced from their inner experience.
For example.
I believe they should continue living no matter how they may be suffering.
Unlike you, I know better than to try to sugarcoat that as somehow their idea to begin with.
These languages are becoming so gay, convoluted and complex you're better off just throwing them all out and learning assembler.
They're literally turning assembly language a simpler and faster choice.
x86 assembly
Code in Odin. Reject all other languages.
Stop listening to the IQfy hivemind they probably believe Rust is still maintained by Mozilla. There is no way trannies are a majority on a language used by a least 2.2 million people.
So /misc/dditors can just keep spamming glowie threads as long as they just mention the board subject. This thread is clearly just an excuse to rant pit IQfyers against GPT-J bots. Jannies pls nuke,