Disabling npm's progress bar yields a 2x npm install speed improvement
twitter.com
twitter.com
Edit: 'main' as in the one doing the one doing the work, in the same spirit of the original post. In truth, the true main thread that runs in main() is where all the iOS GUI work happens. Apologies for the confusing wording.
How come we have to give this person the benefit of the doubt to the point of understanding a term to mean its exact opposite, but you don't have to give us any of that?
https://docs.oracle.com/javase/7/docs/api/java/awt/EventQueu...
A thread? But that'll never scale!
Woah
> This particular app was an Eclipse Plugin
Ah ha ok so it just runs fairly slow now right? :)
Seriously. One notable Smalltalker sped up the compiler in VisualWorks this way. Yes, there is a compiler in Smalltalk, it just usually only compiles one method at a time, which had a lot to do with why no one noticed that printing notifications to the transcript took up most of the time. So for a bulk code load, turning off the notification sped up "compile time" a whole lot. In fact, the JIT-ed Smalltalk in VisualWorks actually outperformed the C/YACC implemented compiler in a different Smalltalk.
Someone needs to keep track of this stuff. Why do we keep making the same mistakes over the decades? (Insert famous Alan Kay quote here.)
installs are literally the #1 thing npm needs to do well, and I really hope we see some improvement soon.
"ied package manager" works, though.
My father works with jewelry. Last week while visiting him, I did in fact search for the term "Ruby" on his computer in his normal browser, and even though he was also logged out, I wasn't able to find one result dealing with the programming language on the first two pages.
https://github.com/alexanderGugel/ied/pull/45#issuecomment-1...
> Thanks, but I'm not going to rename this project anytime soon.
This is the first time I've heard of ied, a little competition could go a long way!
> The npm install command, when used exclusively to install packages from a package.json, will always produce the same tree. This is because install order from a package.json is always alphabetical. Same install order means that you will get the same tree.
> You can reliably get the same dependency tree by removing your node_modules directory and running npm install whenever you make a change to your package.json.
Maybe you're experiencing a bug, rather than some in-grained non-determinism in npm?
Ruby does through bundler, who else does this right? I can't think of any.
Cargo, Rust's package manager
Meteor
Slight nitpick: Mix is part of Elixir, I've never seen a (non-elixir) erlang project that use it. Don't think erlang has an equivalent officially blessed tool, but the most popular one is rebar / rebar3.
(While I'm nitpicking: mix and rebar are more build & dependency managers; mix uses hex for package management. I believe rebar3 can also use hex. In ruby terms, mix ~ bundler (among other things); hex ~ rubygems).
As someone writing a lot of ruby, "give me whatever" is analogous to "give me the latest unless I specify otherwise", which I consider to be a very good default. It keeps me up to date with security issues, and incompatibilities between libraries that the respective maintainers resolve amongst themselves with a minimum of manual work.
Yes, this is the way that Guix and Leiningen and rebar3 and a bunch of other things work, and it is wonderful.
Pulling in new code without you asking is a fine idea for something like apt-get where you have a huge team doing QA on the entire system working together before it even hits your repositories, but for most package managers, the dev team is the one doing the testing, and upgrades should be done only with great care.
It does mean you have to watch for security updates, but this is true of all package managers.
FWIW I have been doing ruby for over a decade now, and I hold up Bundler as one of the great success stories of open source, and it is one of the reasons I hold Yehuda Katz in high regard, in that he was able to solve a really big problem in the community and hammer it into shape aggressively over a period of two years with a lot of doubters and naysayers (even Rubygems core was against Bundler for a long time), until it finally got so solid for so many use cases (libraries vs apps, private vs public, development vs deployment, etc, etc) where it solved nearly everyone's problems in such a solid way that everyone adopted it.
It's a great success in many ways, but the problem it solves is completely self-inflicted by rubygems. I've also been doing Ruby for over a decade, but I've also learned a lot from other library ecosystems, and I feel pretty confident saying that disallowing version ranges makes all those headaches completely evaporate.
Generally I'd use semver ranges in libraries, and then fixed versions + lockfiles for transitive deps in applications.
I suppose this is roughly equivalent to doing `:pedantic :abort` in leiningen, except you wont't have as many warning to squash - either way you have to rely on the test suite to tell you if the versions you've pegged work.
Even in Nix/Guix, it's still ideal for upstream projects to express their dependencies in terms of ranges (semver-wise), otherwise we run into the problem have either really large run-time dependency closures, or problems around e.g. wanting to use multiple (overly specified) versions of C libs within the same process.
As the current maintainer of Nixpkgs' Bundler-based build infrastructure, I've found the lockfile approach that Bundler uses to be quite frustrating - in part because Bundler's design is antithetical to packaging, but also due to the build times and sizes of the resulting packages, compared to C libraries. (People give C a hard time wrt productivity and security and such, but when it comes to packaging, C libs are usually so much easier to work with than most other higher level languages.)
I would love to see more adoption of semver, and possibly Haskell's PVP (https://wiki.haskell.org/Package_versioning_policy). Granted, dynamic programming languages don't have the benefit of making API breakage obvious at build time, so perhaps the best we can do in such cases -- if we want any certainty that packaged applications will actually function correctly -- is lock down every dependency version precisely per application...
One example of this is having a repeatable developer setup guide. If the dependencies might have changed by the time a new joiner starts your setup guide could very easily end up useless or misleading and that's without anything at all in your own codebase having changed.
Shrinkwrap fixes this, but always gets added after things went wrong several times already. It should be the default.
pip freeze > requirements.txt
Which has a similar effect.[0] https://github.com/nvie/pip-tools#example-usage-for-pip-comp...
[1] http://nvie.com/posts/better-package-management/
[2] https://www.jonafato.com/2015/12/15/Rethinking-requirements-...
That said, this looks cool and I'll check it out.
some of the very fundamental designs of npm is seriously wrong.
https://github.com/npm/npm/issues/10890
I started on a very (I would like to emphasize very a thousand times over) basic proof-of-concept to show how much faster it could be in the order of magnitudes:
https://gist.github.com/nijikokun/2f1f16325f8ffe14b1b3
All this does is build a json of every package you currently have installed, and utilizes that as a lookup store the next time instead of rebuilding it every install; this was targeted towards installing / uninstalling existing packages. Not fresh installs.
Fresh installs would benefit from bulk lookups via the API imo.
* Nontechnical: I would like to express my eagerness that the bug be fixed or request its priority be increased, but don't have any additional technical information to add
* Technical: I have useful technical information to add, beyond what is already in the bug
Then "Nontechnical" type comments would be hidden from the developers by default (unless they specifically ask to see them), but their count could be used as a bug prioritisation mechanism (effectively leaving a "Nontechnical" type comment would be counted the same as a vote)
Not that the link to the issue was unhelpful.
I misunderstood the commenter above me. My sincerest apologies. Have a nice day!
http://blog.ircmaxell.com/2014/12/what-about-garbage.html
(Or more accurately the cycle collector. You can't turn off reference counting.)
Here's a side-by-side video: https://youtu.be/odoVfHHBYVM
[0] https://denpa.moe/~syrup/Screen%20Shot%202016-01-26%20at%206...
Here's a side-by-side: https://youtu.be/odoVfHHBYVM
Until recently, I had no clue iTerm was doing something weird. I just figured npm install was just ugly and incomprehensible.
Edit, reminds me of this, which is why I'm wondering http://stackoverflow.com/q/21947452/923847
On the other hand if you didn't do this, then interactive terminal programs would be entirely unusable.
When I write utilities today that do similar things, I only display output when writing and testing the program. Otherwise I'll write to memory then dump the results in a logfile at the end.
In this case since there is probably a less intensive way of providing status updates, and can probably be resolved by doing intermittent checks.
I did this test on a npm library I wrote, installs some test tools and also has to compile some gyp stuff
2.14.2
progress=false real 0m26.589s user 0m12.086s sys 0m3.362s
progress=true real 0m29.553s user 0m12.455s sys 0m3.486s
3.5.2
progress=false real 0m57.489s user 0m13.298s sys 0m3.421s
progress=true real 1m1.084s user 0m15.690s sys 0m3.644s
While I don't see any significant difference between progress bars or none for 3.x, what is 3.x doing that causes almost 30 seconds more churning?
I believe the reason it is slower is it can't do as much parallelism as npm 2. Also, npm 2 was susceptible to a lot of race conditions and non-determinism, especially with compiled dependencies.
One of the most often underestimated areas of product development, though certainly not among the most important underestimates.
Easy to underestimate its cost and impact. After all, it's just a progress indicator.
A good read: "Programmers need to learn statistics or I will kill them all" http://zedshaw.com/archive/programmers-need-to-learn-statist...
Or you know, it's 2016, and it's npm who does it badly.
As an undergrad, I had a 14.4 kbps modem, and an amber WYSE terminal. With that, I was able to do contract work. It reminded me of the amber monitor I had on my Apple II ten years before. A solid phosphor CRT with no shadow mask is a fine thing.
Colors on a modern LCD are great too; give it a chance!
Colors are great for web browsing, don't get me wrong. Just not near my code!
A couple of years ago I was just about to throw out all my O'Reilly X Window/Motif books from 20 years ago and when I landed a contract to update a K&R C based Motif system running on 32-bit Solaris connected to - of course - Sybase. It felt like I travelled back in time.
Old code never dies.
Must be worth a fortune by now ...
When working with a command line one wants npm or any command to run as quickly as possible. Any graphics that slow operation of the command should be an opt-in, not an opt-out.
Everyone is entitled to their opinion, but some people prefer to suppress others' opinion.