Live data from Hacker News

Lodash 4.0.0 is out

github.com

91–100 of 102 posts

Re: Lodash 4.0.0 is out

#91

Earlier quoted context omitted.

bower is not just js, but rather lots of various front-end libraries.

Bower doesn't do anything npm doesn't already do, except horrible version management. bower install lodash => bower_components/lodash/dist/lodash.min.js npm install lodash => node_modules/lodash/dist/lodash.min.js Only difference there is you use `node_modules` instead of `bower_components` for root directory.

Easier to import as a module if you use Browserify or suchlike: `var _ = require('lodash');`

Re: Lodash 4.0.0 is out

#92
post #74
post #66

Earlier quoted context omitted.

Sounds broken. My team alone would have installed it more times that that.

¯\_(ツ)_/¯

After thinking about it a bit more, the only reasonable conclusion I can come to is the following:

It's the number of times users actually typed

    bower install lodash
i.e. adding it to a project that didn't already have it, as opposed to just running bower install on a package which uses lodash.

Would also explain why despite bower itself being installed 37000 times in the last 7 days, the most installed package is only listed as 100 or so times.

Re: Lodash 4.0.0 is out

#93

Earlier quoted context omitted.

If more major libraries drop support for bower, it might (hopefully) die soon. What does bower do better than NPM?

JSPM! It works a lot like NPM but is specifically intended for use with front-end modules. Features: - uses System.js (a polyfill for the future ES6-module-loader spec - supports CommonJS, AMD, and UMD formats - has plugins for importing other types (ex css) - support Typescript/Traceur/Babel out of the box - uses a flat dependency structure (ie like NPM v3) - can generate bundles and self-executing bundles (incl tre…

npm can install directly from GitHub:

    npm install visionmedia/express
Or any git repo:

    npm install git+https://git@github.com/visionmedia/express.git
    npm install git+ssh://git@github.com/visionmedia/express.git

Re: Lodash 4.0.0 is out

#94
post #87

I'm curious why the `thisArg` parameters were removed? I dug through some of the PRs and commmits but was unable to find any specific conversation. It seems odd since the `Array.prototype` methods include it. https://github.com/lodash/lodash/commit/454aca7003e14994e7b9...

It was removed because it added extra complexity for method implementations and was used very little. Folks now can use `_.bind`, or `Function#bind`, or arrow functions.

Re: Lodash 4.0.0 is out

#95
post #71
post #65

Feels good to see a JS lib last that long and still be actively maintained, deprecating obsolete features and adapting to the new ways we use our browsers without breaking BC (or else explaining how to migrate). Coming from Symfony (PHP), this just feels right: keep moving but make it easy to follow along.

Is this a Symphony thing or are external dependencies significantly more reliable in the PHP ecosystem in general? Last time I wrote PHP was 9 years ago and those times everyone I knew just copy-pasted all the external code they found. I know that package managers are the thing now and I'm using nuget for my .NET projects (and npm, which is a must if you do any front-end dev), however, I feel like I'm having more dep…

I would say it is particularly true for Symfony, but other package maintainers, like Tailor Otwell for the Laravel framework, do an impressive job at documenting how to upgrade to newer versions and keeping BC to a minimum.

For instance, I just recently upgraded from Symfony 2.7 to 2.8. The upgrade path was pretty much "Remove all deprecated warnings, upgrade your Symfony package, done". The same upgrade path is used from Symfony 2.8 to 3.0, which makes it really easy to upgrade.

Symfony, as most PHP dependencies, can be installed via the "composer" package manager, which is pretty much the only package manager that is used in the PHP community, it seems. As dchesterton says, it is a very good piece of software.

Re: Lodash 4.0.0 is out

#96
post #3

Not sure if this is a dumb question but I haven't been able to find an answer anywhere. I currently use underscore 1.8.3. Can I just swap lodash in, or is refactoring involved? I know it's a fork, and I want to move over, but was curious if anyone know off the top of their heads if a lot of work as involved.

Lodash v1 was a drop-in Underscore replacement.

Lodash v2 was not but offered an lodash.underscore.js build.

Lodash v3 dropped the compat build in favor of using individual lodash modules until you're able to transition

Lodash v4 continues the view of v3

Re: Lodash 4.0.0 is out

#97

Kudos to John-David Dalton for making such an awesome lib and being such a positive force behind it for so long! I've reached out to him multiple times on Twitter and he's always been quick to help! He should definitely write a post on how he stays productive and motivated to work day-in and day-out on one project. Really inspiring!

Agreed. That's why I invited him on the JavaScript Air show. The live video broadcast podcast all about JavaScript and the web platform. He'll be on live on March 2nd: http://jsair.io/lodash

Re: Lodash 4.0.0 is out

#98

Kudos to John-David Dalton for making such an awesome lib and being such a positive force behind it for so long! I've reached out to him multiple times on Twitter and he's always been quick to help! He should definitely write a post on how he stays productive and motivated to work day-in and day-out on one project. Really inspiring!

Indeed, John-David Dalton, together with Dan Abramov and others have been great in the JS community. Kudos!

You'll be interested to know that Dan Abramov is on the JavaScript Air panel. This is relevant because of this: https://news.ycombinator.com/item?id=10909199 :-)

Re: Lodash 4.0.0 is out

#99
post #85
post #81

Earlier quoted context omitted.

To be fair, that context parameter has only just been removed as part of 4.0.0. Instead they recommend you change your code to be of the form: _.each(collection, _.bind(function, context)) Which actually seems a lot more correct than some arbitrary context parameter

How is it arbitrary? It's part of the ES spec. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... I'm honestly curious why this is being removed?

Ah, I actually didn't realise this was the case, I've always used `.bind(this)` for this kind of thing.

Re: Lodash 4.0.0 is out

#100

Earlier quoted context omitted.

JSPM! It works a lot like NPM but is specifically intended for use with front-end modules. Features: - uses System.js (a polyfill for the future ES6-module-loader spec - supports CommonJS, AMD, and UMD formats - has plugins for importing other types (ex css) - support Typescript/Traceur/Babel out of the box - uses a flat dependency structure (ie like NPM v3) - can generate bundles and self-executing bundles (incl tre…

npm can install directly from GitHub: npm install visionmedia/express Or any git repo: npm install git+https://git@github.com/visionmedia/express.git npm install git+ssh://git@github.com/visionmedia/express.git

Oh... Awesome. TIL, I guess.

Thanks for the tip. I wish my comment wasn't locked in already so I could correct the misinformation.

Post reply on HN