Already submitted: https://hn.algolia.com/?query=lodash&sort=byPopularity&prefi... Seems like no one cares. Strange.
It's easy to not care when there's no context or indication as to what Lodash might be. Too many links, not enough time. I did click -- but only because a previous comment made it seem like Lodash was something related to functional programming. If it hadn't been for that comment, I have ignored the post, because I wouldn't have had a clue WTH Lodash was. Now, sure, people who've already used or heard of Lodash are g…
Lodash v3.0.0
11–20 of 82 posts
Re: Lodash v3.0.0
#12Re: Lodash v3.0.0
#13Is this the same as underscore.js?
Re: Lodash v3.0.0
#14Really nice to see that there's now an auto-curried, function-first version, lodash-fp! I've been really attracted by Ramda JS recently for this reason. https://www.npmjs.com/package/lodash-fp
I've been looking for some real-world examples of how currying might be useful in javascript. Haven't not used a language which supports currying for any real world project, I'm interested to know how it can help. I found a page [1] which talks about currying in javascript, then says "Are there practical uses for currying in JavaScript? Not really." Can you point me at anything which will help me see why it's useful?…
var predicateListFunc = function(props) { return R.allPredicates(R.map(R.curry(R.eqProps), props)); }
var compareProperties = R.unapply(predicateListFunc);
var mergeLists = R.unionWith(compareProperties("Property1", "Property2"));
var groupById = R.groupBy(R.prop("Property1"));
var getGroups = R.compose(R.toPairs, groupById, mergeLists);
var groups = getGroups(list1, list2);
With this code I can merge any two lists (list1 and list2) on any two properties (Property1 and Property2), and then group the result. I use this to synchronize client and server data.I don't know if this answers your question, since I wrote in about an hour of learning Ramda.js, and there might be an easier way of doing it.
Here's a fiddle:
Re: Lodash v3.0.0
#15Really nice to see that there's now an auto-curried, function-first version, lodash-fp! I've been really attracted by Ramda JS recently for this reason. https://www.npmjs.com/package/lodash-fp
I've been looking for some real-world examples of how currying might be useful in javascript. Haven't not used a language which supports currying for any real world project, I'm interested to know how it can help. I found a page [1] which talks about currying in javascript, then says "Are there practical uses for currying in JavaScript? Not really." Can you point me at anything which will help me see why it's useful?…
Re: Lodash v3.0.0
#16Really nice to see that there's now an auto-curried, function-first version, lodash-fp! I've been really attracted by Ramda JS recently for this reason. https://www.npmjs.com/package/lodash-fp
I've been looking for some real-world examples of how currying might be useful in javascript. Haven't not used a language which supports currying for any real world project, I'm interested to know how it can help. I found a page [1] which talks about currying in javascript, then says "Are there practical uses for currying in JavaScript? Not really." Can you point me at anything which will help me see why it's useful?…
I've linked to the slides on currying but you'll need to back up to follow the whole example.
[1] http://scott.sauyet.com/Javascript/Talk/FunctionalProgrammin...
Re: Lodash v3.0.0
#17Really nice to see that there's now an auto-curried, function-first version, lodash-fp! I've been really attracted by Ramda JS recently for this reason. https://www.npmjs.com/package/lodash-fp
I've been looking for some real-world examples of how currying might be useful in javascript. Haven't not used a language which supports currying for any real world project, I'm interested to know how it can help. I found a page [1] which talks about currying in javascript, then says "Are there practical uses for currying in JavaScript? Not really." Can you point me at anything which will help me see why it's useful?…
Re: Lodash v3.0.0
#18It is alternative to underscore.js? Or extensions for underscore.js? Not clear from the page...
It's also under active maintenance from an enthusiastic dev. Do your own research, but I go with lodash.
Re: Lodash v3.0.0
#19Already submitted: https://hn.algolia.com/?query=lodash&sort=byPopularity&prefi... Seems like no one cares. Strange.
I use Lodash but i see not point in this announcement in its current form - what changed exactly? [edit] Changelog is there https://github.com/lodash/lodash/wiki/Changelog Some decisions sound really weird, such as the fact that forEach is now lazy. It is not a standard replacement anymore, and probably break the compatibility for quite a few apps (even if I'm deeply convinced that we should all use the native functi…
// in 2.4.1
_([1, 2, 3]).forEach(function(n) { console.log(n); });
// => logs each value from left to right and returns the lodash wrapper
// in 3.0.0
_([1, 2, 3]).forEach(function(n) { console.log(n); });
// => returns the lodash wrapper without logging until `value` is called
_([1, 2, 3]).forEach(function(n) { console.log(n); }).value();
// => logs each value from left to right and returns the array
Seems that the only apps this change will break are those who are using side effects in a chain. Which is a pretty dubious choice, IMO. Especially given that Lodash is a "functional programming library".Re: Lodash v3.0.0
#20It is alternative to underscore.js? Or extensions for underscore.js? Not clear from the page...
It's supposed to be better, faster, and stronger (more functions) than underscore. It's also under active maintenance from an enthusiastic dev. Do your own research, but I go with lodash.