lua - batteries
lua 확장 베터리 라이브러리에 대해 정리해 본다.
Lua Fun
- 2100stars https://github.com/luafun/luafun
- High-performance functional programming library designed for Luajit
- 3달전
- Basic Functions
- Generators
- Slicing
- Indexing
- Filtering
- Reducing
- Transformations
- Compositions
- Operators
Moses
- 634stars https://github.com/Yonaba/Moses
- Utility library for functional programming in Lua
- fun과 유사하나 더 많은 라이브러리가 있는 듯, moses.lua 파일 하나.
- 6년전
- Table, Array, Utility, Object, Chaining, Import
lua-stdlib
- 289stars https://github.com/lua-stdlib/lua-stdlib
- document - https://lua-stdlib.github.io/lua-stdlib/
- 8년전
- modules(std) - debug, functional, io, math, operator, package, strict, string, table
- Classes - tree, container, object, list, optparse, set, strbuf
Microlight
- 169stars https://github.com/stevedonovan/Microlight
- 말 그대로 경량 penlight, 달랑 ml.lua 파일 하나
- 13년전
- Strings - tstring, table.concat, table.split, expand, escape
- Files and Paths - access, exist, readfile, splitpath, splitext
- Inserting and Extendig - update, extend, insertvalues, import
- Extracting and Mapping - sub, indexby, imap, indexof, ifind, ifilter, imapfilter, collect, removerange
- Sets and Maps - indexof, invert, issubset, makemap
- Higher-order Functions - compose, bind1, bind2
- Classes
- Array Class
- Experiments
Penlight
- 371stars https://github.com/lunarmodules/Penlight
- Python에서 제공하는 여러 라이브러리와 유사한 타입으로 제공한다.
- 3 month 계속 업데이트 및 개선
- Paths, Files and Directories - path, isdir, isfile, exists, dirname, basename - dir, getfiles, getallfiles - file: copy, move, read, write
- Application Support - app, lapp, config, strict, utils, compat, types
- Extra String Operations - utils, stringx, stringio, lexer, text, template, sip
- Extra Table Operations - tablex, pretty, List, Map, Set, OrderMap, data, array2d, permute
- Iterators, OOP and Functional - seq, class, func, utils, compression
Batteries for Lua
- https://github.com/1bardesign/batteries
- love에 특화된 확장 라이브러리이다.
- 하지만 범용으로 사용해도 문제 없다.
- 더구나 Penlight보다 경량이고 빠르다.
- Lua Core Extensions - mathx, tablex, stringx
- General Utility - class, functional, sequence, set, sort, state_machine, timer, pubsub, pretty
- Geometry - intersect, vec2, vec3
- Special Interest - async, colour(color), manual_gc, measure, make_pooled