Joesph
Hello Bois
You girl?
Epem
Hello Bois
Sasikal
Yakov
You girl?
It literally says “IceMan” in his username
Mat
Lol 😂
klimi
Lol 😂
ye that
Yakov
Names can be deceiving
But dicks usually aren’t
MᏫᎻᎯᎷᎷᎬᎠ
Lol
Somaly
Somaly
Hello guys! I’ve got some questions to ask. I’d like to print out the book report to the textfile. I need to pass an array from another text file to an output file which’s called report.txt.... I can print it out but the space is just like this
Francisco
Don't post screen photos
Somaly
Okay thanks guys!!!
Flutter
What all do you do in the group
Epem
C'mon!
Arvind
How to use mod in C ++
Artöm
How to use mod in C ++
Mod? You mean 7 mod 3 is 1? Theres operator %
Alpha Max
Hi
Alpha Max
How to use mod in C ++
Is it modulus or mod value?
Arvind
Is it modulus or mod value?
its mod value negative to positive
Arvind
Abs is to be used
Arvind
i got it
MᏫᎻᎯᎷᎷᎬᎠ
Guys Is there any way to prevent an object from being referenced to? Like this code should produce an error at compile time Object obj; Object& obj_r = obj;
Joesph
It will show error. I guarantee you.
MᏫᎻᎯᎷᎷᎬᎠ
I can give you 1/10 for the joke and 2/10 for me being nice That's 3/10 Hahahah
MᏫᎻᎯᎷᎷᎬᎠ
Or I should report you for spitting some OT in the group
MᏫᎻᎯᎷᎷᎬᎠ
qwert
https://stackoverflow.com/questions/13236048/is-it-possible-to-disallow-taking-a-reference-to-an-object There's no way to disallow pass-by-reference for a type.
MᏫᎻᎯᎷᎷᎬᎠ
Tobias🐾🚲
Long Story I don't want to tell
But that story might give a good insight into: Why What would be an actual solution.
jot.rs
Yea it's probably XY problem
Tobias🐾🚲
Like: "Incompetent coworker did x" Solution: Setup CI + static check for coworker y to mark all refs as "needs-review"
MᏫᎻᎯᎷᎷᎬᎠ
Yea it's probably XY problem
Maybe But I'll look like a crazy if I told you :(
klimi
Tobias oh hi
MᏫᎻᎯᎷᎷᎬᎠ
Go ahead :P
Okay I'm trying to implement a Rust borrow checker-like mechanism Through using two classes class ref which is like immutable reference And mut_ref for the other The problem is What if the client created a reference object to those classes. this will break the whole logic
MᏫᎻᎯᎷᎷᎬᎠ
I know It may sounds stupid or crazy
MᏫᎻᎯᎷᎷᎬᎠ
use some template metaprogramming magic interfaces maybe...
Yeah that's what I'm doing And the answer surely it is there
MᏫᎻᎯᎷᎷᎬᎠ
If you want rust use rust? You're not going to make c safe. :P
Nah I like to dig my mind with C++ I'm sure there is We just didn't figure it out
MᏫᎻᎯᎷᎷᎬᎠ
Yeah that's what I'm doing And the answer surely it is there
I tried to add a Lifetime template variable parameter That the user should specify But that would be some how verbose
MᏫᎻᎯᎷᎷᎬᎠ
In rust compiler enforces it, its impossible to do such thing via library
It's already done Through macros But it's some kind crappy code
Artöm
I bet it can be easily bypassed
MᏫᎻᎯᎷᎷᎬᎠ
That's why I love C++ ❤️
jot.rs
:D
Tobias🐾🚲
https://youtu.be/Lj1GppqNr8c
Still not safe, defeatable by any user that wants to get around it. :P
MᏫᎻᎯᎷᎷᎬᎠ
Tobias🐾🚲
Yeah That's the problem
Thats how it will always be. C++ isnt rust. If you want rust - use rust.
MᏫᎻᎯᎷᎷᎬᎠ
I'll try my best
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
Why?
Need the safety of Rust And need some magic of C++
Tobias🐾🚲
Need the safety of Rust And need some magic of C++
The "magic" is the bit that breaks all the safety of rust.
Tobias🐾🚲
The extensive ways to shoot your own foot in c++ aren't compatible with rust-style safety.
MᏫᎻᎯᎷᎷᎬᎠ
That's why I didn't want to talk about my reason in the first place Cuz I know what you are gonna say ;)
jot.rs
Still not safe, defeatable by any user that wants to get around it. :P
In Rust you can defeat borrowck too, but it's still useful
Tobias🐾🚲
MᏫᎻᎯᎷᎷᎬᎠ
C# is waiting for you
Nahh C# is cool but I put off easily with GC languages
Tobias🐾🚲
Unless there is some compile-time code
Which is about the most awful thing.
Dima
In Rust you can defeat borrowck too, but it's still useful
Are you against or do you agree with engineer from Actix server?