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
Anonymous
lol ICPC members codes are awful
It depends If ICPC member knows how to write good code, he/she will, if it's needed
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 🇱🇹
constinit const static auto i = 5;
Jesus Christ how horrifying
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
Ибраги́м
Sorry, I was mistaken with other thing hahaha
OK, I thought as much. It was wierd.
Ибраги́м
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]]?
Ибраги́м
wtf [[gnu::a_very_uselless_attribute]]?
It's a uselless GNU attribute.
Jussi
i know of maybe_unused
Ибраги́м
Jussi
why is it typo'd?
Ибраги́м
why is it typo'd?
Attributes that means nothing to compiler or language gets ignored
Jussi
lol
Ибраги́м
[[gnu::a_very_uselless_attribute]] constinit const static auto i = 5; The fun never stops.
That's why u can do sth like this and still get away with it, it's stealing goods worth <= 900$ in Carlifornia.
klimi
Welcome
Anonymous
Thanks
Anonymous
Hewwo guys :3
Dima
Hey
Mar!o
How is it possible to get a fancy rank?
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
Anonymous
/
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
Surge.rs
True
Anonymous
constinit const static auto i = 5;
you forgot thread_local😂
Ибраги́м
you forgot thread_local😂
Just add urs and make sure it compiles
olli
static thread_local inline constexpr volatile const unsigned long long int* const a{}; (C++17)
Dima
klimi
Cuz of the message that the reply is targeted
Anonymous
How to check given number is prime or not
Anonymous
How to check given number is prime or not
You misclicked, it's not Google
Anonymous
Ok
Mar!o
static thread_local inline constexpr volatile const unsigned long long int* const a{}; (C++17)
static thread_local inline constexpr volatile const unsigned long long int* restrict const volatile* restrict volatile const var {};
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
/report
Thanks bro.
JATIN SINGH
/report
Till
static thread_local inline constexpr volatile const unsigned long long int* const a{}; (C++17)
alignas(std::hardware_destructive_interference_size) static thread_local inline constexpr volatile const unsigned long long int* const a{};
rock
Hi