lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Alexander Gladysh <agladysh@gmail.com> wrote:

> Announcing lua-geoip 0.1.1, a set of bindings for MaxMind's GeoIP library.

Funnily enough I have been playing around with the MaxMind data this week.
I have a Lua + LPEG script which converts the MaxMind CSV files into a Lua
data structure. This script is rather meta because the CSV data parser is
created by a CSV header parser which is created by the lpeg re parser. Its
output is a lua module containing the data structure. This output module
is compiled with luac so that the whole thing can be loaded in a few
seconds. The compiled file is half a gigabyte and lua uses 1.75GB once it
is loaded. I have another script that uses this module to process
logs looking for users whose webmail accounts might have been compromised.
It takes about a minute to process 200MB of logs and uses 3GB RAM...

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Tyne, Dogger: Variable or northwest, becoming east or northeast, 3 or 4.
Slight becoming moderate, occasionally rough later in Dogger. Occasional rain.
Moderate or poor, becoming good later.