flowyroll / lodash.lua Goto Github PK
View Code? Open in Web Editor NEWlodash inspired library for lua
lodash inspired library for lua
http://axmat.github.io/lodash.lua does no longer seem to work. Does anyone have an idea where it is moved to ?
I'm having trouble reproducing the groupBy example:
_.print(_.groupBy({4.3, 6.1, 6.4}, function(n)
return math.floor(n)
end))
--> {[4]={4.3}, [6]={6.1, 6.4}}
What I get instead is a result keyed by strings instead of numbers:
$ lua
Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio
> _ = require 'lodash'
> _.print(_.groupBy({4.3, 6.1, 6.4}, function(n) return math.floor(n) end))
{["6"]={6.1, 6.4}, ["4"]={4.3}}
The rockspec file contains
source = {
url = "git://github.com/axmat/lodash.lua",
tag = "v0.02",
}
The use of git://
is deprecated (see this Github blogpost)
Please replace with https://
so it works again.
Currently trying to install lodash through LuaRocks fails on this.
$ lua
Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio
> _=require 'lodash'
> inspect=require 'inspect'
> print(inspect(_.sortBy{16, 12, 20, 13, 17, 14, 18, 10, 19, 15, 11}))
{ 12, 16, 13, 17, 14, 18, 10, 19, 15, 11, 20 }
With the patch for issue #12 (thx for that :)) the rockspec file works again.
Unfortunately, the new rockspec has not been published/updated at the 'luarocks' repository. It still has the old one.
Would be great if the repo also gets the new one! Maybe even bump the version to 0.03 to prevent confusion?
Hello, enjoying this library as it saves me a lot of time. However I would like to point out that according the luarocks page it's compatible with lua >= 5.1, whereas there are several functions which use goto, which is only compatible with 5.2.
Is there any chance you could remove the gotos, or make versions for both 5.2 and 5.1, or last but not least update luarocks? It would be very much appreciated!
In lua 5.1, I get the following error when using _.print
:
Error: rocks/share/lua/5.1/lodash.lua:1742: attempt to call field 'pack' (a nil value)
stack traceback:
rocks/share/lua/5.1/lodash.lua:1742: in function 'table'
rocks/share/lua/5.1/lodash.lua:2222: in function 'print'
modules/load.lua:9: in function 'load'
[string "boot.lua"]:437: in function <[string "boot.lua"]:433>
[C]: in function 'xpcall'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.