Lua - Part 10

https://github.com/moteus/lua-lluv

Lua low level binding to libuv

Related projects
lluv-ssl - SSL/TLS sockets for lluv library
lluv-websocket - Websocket sockets for lluv library
lluv-redis - Redis client for lluv library
lluv-memcached - Memcached client for lluv library
lluv-ftp - FTP client for lluv library
lluv-poll-zmq - ZMQ poller for lluv library
lluv-rs232 - Serial port communication library for lluv library
lluv-gsmmodem - Control GSM modem connected to serial port using AT commands.
lua-gntp - lluv connector to Growl notification system
lluv-esl - FreeSWITCH ESL implementation for lluv library
lluv-curl - Make asyncronus requests using libuv and libcurl
lluv-pg - PostgreSQL client for lluv library
lluv-busted - Support async tests for lluv library using busted
lluv-qless - Binding for qless - queue / pipeline management system
lluv-pegasus - Simple HTTP server based on pegasus.lua library


https://github.com/libuv/libuv

Cross-platform asynchronous I/O

Libuv is a multi-platform support library with a focus on asynchronous I/O. It was primarily developed for use by Node.js, but it's also used by Luvit, Julia, pyuv, and others.


http://luvit.io

Luvit implements the same APIs as Node.js, but in Lua!

This helps teams migrate without having to learn a new way of programming.

https://luarocks.org/modules/moteus/lluv

Redis

redis-lua

A Lua client library for the redis key value storage system.

https://luarocks.org/modules/nrk/redis-lua

http://github.com/nrk/redis-lua

Memcached

https://luarocks.org/modules/nbz4live/lua-resty-memcached

https://github.com/openresty/lua-resty-memcached

http://wiki.nginx.org/HttpLuaModule


https://redmine.lighttpd.net/attachments/317/Memcached.lua

https://github.com/silentbicycle/lua-memcached


You can use following command to get a list of modules with

nginx -V 2>&1 | tr -- - '\n' | grep module

iOS 12 uses Lua code downloaded from Apple's servers (twitter.com)

https://mobile.twitter.com/_inside/status/1026173832527265792

Fun fact: some of the predictive stuff on iOS 12 is based on Lua code downloaded from Apple's servers, which means the behavior can be updated without the need for a full OS update

https://news.ycombinator.com/item?id=17700894 - 45 comments

image of code

XML

https://stackoverflow.com/questions/40634946/how-to-parse-xml-file-in-lua

http://lua-users.org/wiki/LuaXml

https://askubuntu.com/questions/733169/how-to-install-libxml2-in-ubuntu-15-10/836698

apt-get install libxml2-dev
apt-get install libxml2
luarocks install lua-xmlreader

not working.

typed up the script in the above stackoverflow.com post, but got the error:

lua: error loading module 'xmlreader' from file '/usr/local/lib/lua/5.3/xmlreader.so':
    /usr/local/lib/lua/5.3/xmlreader.so: undefined symbol: luaL_checkint

i think that xmlreader is not updated to work with lua 5.3.


ignore xmlreader and use expat to parse xml.

http://sawv.org/2018/08/08/lua-script-using-expat-xml-parser.html

local lxp = require "lxp"

if the xml file is an rss or atom file, then use feedparser, since it's built for rss and atom files. generic xmls, then use lxp.


Aug 30, 2018

https://luarocks.org/modules/luarocks/lunatest

luarocks install lunatest

https://github.com/silentbicycle/lunatest

Lunatest is an xUnit-style, Lua-based unit testing framework with additional support for randomized testing (a la QuickCheck).

It's largely upwardly compatible from lunit, with the following changes:


Aug 30, 2018 - plan to make lua-memcached module work in lua 5.3.

http://www.lua.org/versions.html

http://www.lua.org/manual/5.2/readme.html#changes

http://www.lua.org/manual/5.3/readme.html#changes

https://github.com/jrsawvel/Dark-Sky-API-Lua/blob/master/lib/darksky.lua

https://www.lua.org/manual/5.3/manual.html

https://github.com/silentbicycle/lua-memcached

http://lua-users.org/wiki/ObjectOrientedProgramming