5 ms·
From the article: "The Lua standard library uses the POSIX C library, making it portable; but that also means that you can’t use sockets, it doesn’t support sig
by vancan1ty 11y ago
From the article: "The Lua standard library uses the POSIX C library, making it portable; but that also means that you can’t use sockets, it doesn’t support signals or timers, and all OS calls block the thread. Using the POSIX C library is like going backwards in time."
I can't speak to the "Lua standard library" but I can say that I believe every single statement above about the POSIX C standard is incorrect as written.
POSIX Sockets: http://man7.org/linux/man-pages/man2/socket.2.html http://man7.org/linux/man-pages/man2/socket.2.html
POSIX Signals: http://man7.org/linux/man-pages/man7/signal.7.html http://man7.org/linux/man-pages/man7/signal.7.html, http://pubs.opengroup.org/onlinepubs/009695399/functions/sigaction.html http://pubs.opengroup.org/onlinepubs/009695399/functions/sig...
POSIX Timers: http://www.2net.co.uk/tutorial/periodic_threads http://www.2net.co.uk/tutorial/periodic_threads, http://pubs.opengroup.org/onlinepubs/009695399/functions/timer_create.html http://pubs.opengroup.org/onlinepubs/009695399/functions/tim...
Nonblocking IO: http://man7.org/linux/man-pages/man7/aio.7.html http://man7.org/linux/man-pages/man7/aio.7.html
That doesn't mean that the POSIX features are best in class or easy to use -- rather just that the features exist.
- brimworks 11y agoThat was a mistake in the article. I should have said "ANSI C". I'll see about getting it corrected. Thanks!