Ludovic 'Archivist'
Can share a bit more about this story?
You can look into the Se-radio podcast episode 282, it is a very humbling story about concurrency in unreliable systems
布丁
No, "fearless" concurrency is a myth
What do you think the so-called "fearless concurrency" is about?
~
I have found both, I found deadlocks, livelocks , inconsistent state handling, timing errors and more. memory collisions are the easiest race conditions to avoid, even in C++. In c++ it is a matter of shared_ptr<const T>
Can you share the snippet? Because I have honestly never run into a race condition in Rust. The compiler guarantees that only one party can have write access at a time during compile time, so race conditions are basically impossible. If I try to send a non Send and non Sync variable to another thread, the compiler tells me at compile time. Then I had wrap that variable inside an Arc<Mutex<>>, which implements Send and Sync. Inside that, it is guarated that only one write happens at a time. The only real issue I can run into is a deadlock, where threads end up waiting on each other’s mutex lock. Std::shared_ptr does not ensure only 1 mutable access exists at a time, it also does not tells me if I create mistakes with it (I have to write a test or the mistake shows up in runtime because of my skill issue can not write reliable test code :(
布丁
https://www.ralfj.de/blog/2025/07/24/memory-safety.html A bit readings towards being pedantic🤣
Pavel
It would https://security.googleblog.com/2024/09/eliminating-memory-safety-vulnerabilities-Android.html
Well, many projects don't care about this, so it wouldn't convert into more money. Rewriting the codebase however will cost the money
布丁
Can cause monetary loss also
~
Well, many projects don't care about this, so it wouldn't convert into more money. Rewriting the codebase however will cost the money
It does not need to be a rewrite too. It can just be used in new project if the team knows it
Krish
Why messages get deleted for no reason ?
wolf
yeah, same happened here and why?
Pavel
I think saying “many things” is a bit over the top. For me, it really depends on the use case and how skilled the team is right now. I also think Rust isn’t the best fit for game programming, C++ has Unreal Engine with decades of development behind it. From my own experience on an Intel i5 10th gen with 20GB RAM, compiling Rust and C++ projects that use third party libraries takes about the same amount of time. I’ve used Tokio, Libcoro, and Photonlib, and honestly the compile times felt pretty similar. Where Rust really shines, in my experience, is on the server side things like backends, game servers, and real time servers. The ecosystem there is already mature, and the documentation is easy to find and understand since it’s centralized on one site. By contrast, C++ library documentation can be scattered and sometimes hard to digest. I came from Go, and found that Rust is easier to master and produce high quality code (no memory mistakes, race conditions in safe Rust and less sneaky performance pitfalls). I have built some backends in C++, it ran, but when I benchmarked it, the performance was actually below Go and Java (it is “my C++ skill issue ><”). But in working with raw pointers in Rust feels almost the same as in C++ (the other safeties are still on, only raw pointer is same like in C++). That’s why I see C++ as great for the super low level parts, while Rust fits better a bit higher up the stack especially if the team doesn’t have super deep low level expertise. I use translation :)
The problem is not the compile time, it is the whole process of iterating on the features and the ability to throw some code away quickly, without spending extra time to make it proper. Ofc one could say "make everything scriptable", or "do everything through ECS and you would never need to adjust the architecture", but that complicates things a lot as well, especially for smaller projects where a few extra months of work can mean life or death for the project. For server-side only apps I think Rust or Go should replace C/C++ for sure eventually, but again, some services still running on Pascal, and people are afraid to touch them.
Pavel
Why messages get deleted for no reason ?
Probably the retarded antispam bot, it should get better the longer you are in the chat
Never Spam Bot
Krish is now approved by the group admin and can send messages without any restrictions Well i am disappointed by the fact that there are things that are important and written to help sometimes guidance, but bot is like :- always delete messages, and it feels like i am idiot who wrote the message at first place See spam? Quote the spam message in the group and reply with /spam
klimi
Why messages get deleted for no reason ?
your messages triggered the antispambot
Pavel
Tbh, I have not really had any trouble iterating over features in Rust after using it for around 8 months. Once I get used to it, fixing the mistakes the compiler points out feels just like fixing a missing semicolon. I think hardly anyone uses Pascal anymore probably less than 1%, because it barely ever comes up in the community in my country.
Not sure where to start. First of all, this something that I heard a lot over the years (that it comes with experience; just get better at it, and then it is smooth sailing), I call it bullshit. Rust forces you to do some specific design decisions that other languages don't. For example ECS is basically the only viable object model to choose for games. You are working around Rust limitations and framework limitations all the time. Which is not uncommon if you use an existing game engine or UI framework, but every such thing limits creativity and ability to experiment. I used to tell this to a couple of young developers who were into forcing some part of the game into a rigid framework: "If a game designer comes to you and asks you to add a feature, you don't want to tell them that you can't add this feature because it doesn't fit into your architecture". Games can change a lot during development, one game I worked on once decided to change the core gameplay after few years of development and one year before release, they basically cut half of the game and threw it to trash, cut part of another game and stitched it together with some ugly patterns and friend classes. They done it in two months during which the rest of the team was working on the game (and then it slowly got refactored into OK code over time). If they wouldn't be able to do that change, the game would likely fail and not become their best selling game earning them millions. There is a good article that covers it well, basically don't need to read what I say, just read it instead: https://loglog.games/blog/leaving-rust-gamedev/ Just a few months ago I was on a presentation from other guys who were making a game in Rust for a few years, they were quite unsatisfied with it. Though their main point was that every library they used would start falling apart on their use cases or stop being supported while they were in the middle of development, so they had to change rails several times. They say "we were struggling with this framework a few years ago, we heard it may be better now with this feature that we were missing, it is probably better now", but I hardly believe that, it is something people were saying all the time, yet there is always something remains broken.
Pavel
Tbh, I have not really had any trouble iterating over features in Rust after using it for around 8 months. Once I get used to it, fixing the mistakes the compiler points out feels just like fixing a missing semicolon. I think hardly anyone uses Pascal anymore probably less than 1%, because it barely ever comes up in the community in my country.
Sure I'm having good time with my applications that I develop in my free time. But since I don't have a customer for them except myself, I can live with the limitations that the framework I use has, if it doesn't support some features, or doesn't work with some versions of Vulkan, or fonts sometimes stop working, or it were crashing on some specific versions of Rust. I can also not implement some features because I don't want to struggle with them. I can also shitcode as much as I like, basically working around Rust borrow checker by juggling indexes to arrays instead of storing smart references/pointers, or writing my own containers with unsafe. Sure it is faster to implement new features this way, but would I do that if it was a production code? Not in C++ at least, there I would be fired if my code would look like this.
Chat Boss
Amara sent a code, it has been re-uploaded as a quote //why my code is wrong(when I am updating n inside the loop why it is not updating term ,is it like that I have to write term inside the loop then only it will be updated,means I have to write the term inside the loop then only it will work) //A.P 100,97,94... till positive terms using for loop (using math) #include<stdio.h> int main(void){ int n=1,term=103-3*n; for(;term>=0;n++){ printf("Term %d->%d ",n,term); } printf("\n"); return 0; } /* Explanation: The code enters an infinite loop because the value of term is never updated inside the loop. The loop condition term >= 0 remains true indefinitely, leading to a runtime error. The value of 'term' is dependent on 'n', but after initializing 'term', it isn't updated with the changing value of 'n'. Term 1->100 Term 2->100 Term 3->100 Term 4->100 Term 5->100 */
Vlad
Or you should re-evaluate term each iteration
Vlad
Computers do not just "guess" when does the expression should be evaluated. You have to be specific
Vlad
You can also implement term as a function so it will be re-evaluated with each call
Vlad
int term(int n) { return 103-3*n; } for(; term(n) >= 0; n++) { // ... }
Vlad
You will be executed on the spot if you try to push that kind of code into production but for helloworlds it will do
Ritika
Hi write me guys
what is problem with it,dude?
I have a problem when i install sdl
mito
@lsp3090ti anti spam bot is deleting your msgs. Maybe you can try after a while.
I know thanks
Vlad
Vlad
Are you on windows?
I am using gentoo linux
Vlad
I am using gentoo linux
Ok, it should be as easy as to just ./configure make make install no?
Vlad
I am using gentoo linux
https://github.com/libsdl-org/SDL/blob/main/INSTALL.md
Vlad
This one?
Vlad
Btw don't go to sdl. org. Worst mistake of my life
It is cmake page
I copy the example of his cmake
Vlad
I copy the example of his cmake
Did you build sdl itself?
I haven't do it
Vlad
Docs are a little retarded shall we say
Vlad
In install it does not specify install
Vlad
I haven't do it
Try to build it from the repo and install it on your system
I don't know what happen when i use cmake -S -b build
my package manager is working for update system
Vlad
Do you use sdl3 or sdl2?
sdl3
 bin  build  CMakeLists.txt  include 󱧼 src  vendored
Vlad
https://github.com/libsdl-org/SDL/blob/main/INSTALL.md
So it expects you to have sdl3 as a subdir in your project
Vlad
What the fuck
this my directory structure
I don't know what is subdir config in his example , i just follow him then look the fail output info
Vlad
Just git clone --recurse-submodules this
Vlad
And start from there
how to do next after i cmake -S -B build and done make in build directory?
Vlad
No?
 bin  build  CMakeLists.txt  include  sdl3-sample 󱧼 src
i haven't find it
Vlad
It should be in build folder
like this
klimi
Hm this stupid bot... yep yep
klimi
like this
Try sending it now
 cmake_install.cmake  libSDL3.so.0  libSDL3_ttf.so  libxmp.so.4.6.3  CMakeCache.txt  libSDL3.so.0.3.0  libSDL3_ttf.so.0  Makefile  CMakeFiles  libSDL3_image.so  libSDL3_ttf.so.0.3.0  SDL  CPackConfig.cmake  libSDL3_image.so.0  libtiff.so  sdl-min  CPackSourceConfig.cmake  libSDL3_image.so.0.3.0  libtiff.so.6  SDL_image  gs_tiger.svg  libSDL3_mixer.so  libtiff.so.6.0.2  SDL_mixer  Inter-VariableFont.ttf  libSDL3_mixer.so.0  libxmp.so  SDL_ttf  libSDL3.so  libSDL3_mixer.so.0.1.0  libxmp.so.4  the_entertainer.ogg
a lot of so file in sdl3-sample/build
what should i do?
Vlad
Project is called sdl-min
Vlad
Your binary file is sdl-min
I even don't know what it do for me
after explain
so i just mv the so file to my originly project directory that k as my so then declare it in cmake config then cmake?
Is it right i explain?
Vlad
I even don't know what it do for me
It's an empty executable
Vlad
It just links sdl and does nothing
Vlad
A placeholder to put your code in
I need some time to understand it ,thanks for help
Lucifa
Pippi
The more i study the more i need to go deep and it gets deeper and deeper
Pick a niche project, something you are interested in. It will get easier. Don't get overwhelmed. Master the libraries that are specific to what interests you.