Blog: 2025-02-16: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 32: | Line 32: | ||
g_startup_complete = true; |
g_startup_complete = true; |
||
pthread_mutex_lock(&g_main_deadlock); |
pthread_mutex_lock(&g_main_deadlock); |
||
</pre> |
|||
--- |
|||
<pre> |
|||
hack $ cat test.c |
|||
#include "stdio.h" |
|||
#include <sys/socket.h> |
|||
int main() { |
|||
printf("AF_INET %d\n", AF_INET); |
|||
printf("AF_INET6 %d\n", AF_INET6); |
|||
} |
|||
hack $ gcc -M test.c | grep sys/socket |
|||
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h \ |
|||
</pre> |
</pre> |
Revision as of 19:16, 16 February 2025
ok so there is a
luarocks install --local
Then you get the path modification with
luarocks path
Still to read: https://leafo.net/posts/itchio-and-coroutines.html
and also can look in to https://moonscript.org/ but I think fennel will work better
Actually lots of guides here https://leafo.net/guides.html
kinda like my website :)
---
Cool aerospikedb infinite loop without busy spinning
//-------------------------------------------- // Startup is done. This thread will now wait // quietly for a shutdown signal. // // Stop this thread from finishing. Intentionally deadlocking on a mutex is // a remarkably efficient way to do this. pthread_mutex_lock(&g_main_deadlock); g_startup_complete = true; pthread_mutex_lock(&g_main_deadlock);
---
hack $ cat test.c #include "stdio.h" #include <sys/socket.h> int main() { printf("AF_INET %d\n", AF_INET); printf("AF_INET6 %d\n", AF_INET6); } hack $ gcc -M test.c | grep sys/socket /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h \