From a casual glance, luafun tries to compose with iterators as much as possible. It looks like Moses is largely table based, which might be more memory intensive.
Also, luafun was designed around optimizations offered in LuaJIT. I doubt the same is true of Moses.
I find aliases to be pretty clearly bad API. By all means, include those aliases in documentation so people can search using them, but having a code base littered with two different names for the same thing makes it harder to search, learn from and code-mod it.
It provides a lazy sequence abstraction based on iterators as well as a nice set of functional building blocks. I think this type of library design is better than the for loop based style of moses because you can handle infinite sequences, partially sampled execution, early stopping, etc.
Nice library - I've put it on my workbench for some experiments. I've been using lua-enumerable for pretty much the same purpose - its a little lighter (single file to drop into your project) and it grafts on top of table, so its also less likely to impact your other usage of "_", if you use it, in a project ..
8 comments
[ 3.1 ms ] story [ 25.2 ms ] threadAlso, luafun was designed around optimizations offered in LuaJIT. I doubt the same is true of Moses.
[1] - https://github.com/deepmind/classic
https://github.com/rosejn/lua-fn/blob/master/fn/seq.lua
It provides a lazy sequence abstraction based on iterators as well as a nice set of functional building blocks. I think this type of library design is better than the for loop based style of moses because you can handle infinite sequences, partially sampled execution, early stopping, etc.
https://github.com/mikelovesrobots/lua-enumerable