Comments by "Vitaly L" (@vitalyl1327) on "ThePrimeTime"
channel.
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
@nitsujism You need to maintain FPS for a human user. It's not going to break the logic of you're running at 0.001FPS instead - the rest of the system will behave the same way, user himself is an understanding part.
For audio - again, it's quite easy to bag the data and to test on historic data, so real-time is not always required. Delay line is trivial to simulate.
As for logging, of course it'll be extremely dumb to use io steams, to use any kind of system calls, etc. All the proper logging frameworks use lock-free communication from real-time threads to non-realtime logger threads, with potentially quite large buffers accumulating the logged data. I'm in no way advocating for just sprinkling printfs here and there, it'd be barbaric.
As for segfaults, quite often simply running a debug build can make your segfault go away (or to mainfest somewhere else). Valgrind, or address sanitiser, or just a more elaborate logging would be far more precise in locating where exactly your data got corrupted (which can be very far away from where the segfault happened). Debuggers only delay finding the root cause of the problem by diverting your attention to unrelated code paths.
2
-
2
-
2
-
2
-
2
-
@daniilpintjuk4473 That's not always possible. Either your code is heavily concurrent, or you're wasting the hardware capacity. Having said that, yes, you must always do your best to avoid concurrency where it's not needed. E.g., a single FSM with predictable timing is better than an interrupt-driven system, as you can always reason about the worst case timing and make sure it meets the hard real-time requirements. No way to do it with concurrency present. Yet, there's a form of concurrency that's even harder to debug and that's pretty much unavoidable in any modern system - multiple communicating devices, e.g., a number of MCUs communicating, each can be perfectly single-threaded and sequential, but their interaction still only makes sense in real-time and cannot be paused.
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1