Deleted Account
For example:
1. Traditional socket recv is synchronous lying
2. Call recv in lua and wait in sync
3.lua will exit lua vm and hand over control to c language
4.c language call WSARecv delivers asynchronous read request
5. When WSARecv requests complete data filling into lua
6. Re-enter LUA VM
7.recv Return
Deleted Account
Assign a lua ctx to each connection
Deleted Account
WSARecv is an IOCP that posts a recv request that returns asynchronously.
Sasuke
Thankyou guys for suggesting me book C primer plus from Stephan Parta. It's great book, really well explained
Anonymous
b r u h
Anonymous
Where do they even come from?
Dima
¯\_(ツ)_/¯
Anonymous
Khaaaaan!
Mar!o
Anonymous
@buryburyzaymon, we don't allow you to post your tutorials
Dima
lol ICPC members codes are awful
Body
Guys I need a help with formation of ships in sea battle. I would be glad to discuss my problem in direct.
Mar!o
So whats the problem?
Dima
Ибраги́м
constinit const static auto i = 5;
Ибраги́м
What a time to be alive
Roxifλsz 🇱🇹
Dima
Lol
Ибраги́м
Ибраги́м
Imagine if we apply attributes
Francisco
Well, the static is not necessary
Ибраги́м
Francisco
A constinit variable is like a mutable constexpr variable
Ибраги́м
So, u have no evidence...
Ибраги́м
constinit - specifies that a variable must have static initialization, i.e. zero initialization and constant initialization, otherwise the program is ill-formed.
https://en.cppreference.com/w/cpp/language/constinit
Francisco
Sorry, I was mistaken with other thing hahaha
Ибраги́м
Francisco
Ибраги́м
Jay don't do it
Ибраги́м
Don't, it will get u banned
Anonymous
Ok
Ибраги́м
But this remains true
True 💯
When the const is removed in the above snippet, u can reassign to i. i =10;
Ибраги́м
[[gnu::a_very_uselless_attribute]] constinit const static auto i = 5;
The fun never stops.
Francisco
What I wanted to say is that constinit const = constexpr
Jussi
wtf [[gnu::a_very_uselless_attribute]]?
Ибраги́м
Jussi
i know of maybe_unused
Ибраги́м
Jussi
why is it typo'd?
Jussi
lol
klimi
Welcome
Anonymous
Thanks
Anonymous
Hewwo guys :3
Dima
Hey
Mar!o
How is it possible to get a fancy rank?
Dima
Mar!o
Well next to your name - Code warrior. Or what is this?
yoav
i created a function "mulstr" that need to multiplay the string many times as wanted by the argument here is the function:
char* mulstr(char* str, int multi){
char* multipled;
for(int i = 2; i <= multi; i++){
strcat(multipled, str);
}
return multipled;
}
and i got into a error segmention fault and i do not know why
Surge.rs
Prolly because you are using strcat which is accessing memory its not allowed to access and resulting in segfault
yoav
Anonymous
/
Surge.rs
Francisco
Francisco
I have a question regarding synchronization. I want to make yet another productor-consumer program (wrapped in a class), but I think I keep getting a deadlock and can't really find where I'm wrong (there surely is some lack of understanding):
https://godbolt.org/z/9QzUj-
Surge.rs
C or C++?
Looks like C as not using std::string
Francisco
Surge.rs
True
Anonymous
olli
static thread_local inline constexpr volatile const unsigned long long int* const a{};
(C++17)
Dima
Dima
Emir
klimi
Cuz of the message that the reply is targeted
Anonymous
How to check given number is prime or not
Anonymous
Anonymous
Ok
olli
restrict is not Cxx and hence it does not compile / not iso conform
Dharmendra
U can earn money from that's amazing app
Pavel
/report
Liam
/ban
Liam
Pavel
JATIN SINGH
/report
rock
Hi