Blog: 2025-02-16: Difference between revisions
Jump to navigation
Jump to search
(Created page with "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 :)") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
kinda like my website :) |
kinda like my website :) |
||
--- |
|||
Cool aerospikedb infinite loop without busy spinning |
|||
https://github.com/aerospike/aerospike-server/blob/d6aef6451375cbab0d2f4f7ea979b6b05265e9c3/as/src/base/as.c#L202 |
|||
<pre> |
|||
//-------------------------------------------- |
|||
// 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); |
|||
</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> |
|||
--- |
|||
huh?? looks fiendishly similar to my refined stack overflow https://github.com/AnweshGangula/StackMeFirst |
Latest revision as of 22:42, 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 \
---
huh?? looks fiendishly similar to my refined stack overflow https://github.com/AnweshGangula/StackMeFirst