TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Unix philosophy without left-pad, Part 2: Minimizing dependencies

112 pointsby lizmatover 3 years ago

10 comments

rectangover 3 years ago
People keep saying &quot;pin versions&quot; as a defense against supply chain attacks. That&#x27;s all well and good until something widely used like log4j has a remote-code-execution exploit and then it all comes crashing down.<p>Trusting any single author is a single point of failure — eventually the author of one of the packages you depend on will get compromised and an attacker will publish a malicious package. To combat this, you need package validation by multiple independent identities. The classic ways to do this are to have multiple people sign a package using PGP, or to rely on vendor endorsement — but the theory behind it is just multi-factor authentication.<p>A second useful step is connect releases to an open source commit history. This makes it much more feasible for independent authorities to review the differences between release versions as a sequence of logical, coherent commits. The ideal is to have multiple committers on a project sign a release package, after having followed the commit history as it played out.<p>If a package cannot be connected to an auditable history — because a source package is grossly transformed from what&#x27;s in a repo, because there&#x27;s no public repo, because the history is just one big commit or similarly useless, or because a binary package is not created using a reproducible build — then it is harder to have confidence in it.
评论 #29523182 未加载
评论 #29523463 未加载
评论 #29523325 未加载
z3t4over 3 years ago
I&#x27;ll rather use a really small, static (as in never changing) package then something bloated that get updates every day and breaking changes from time to time. left-pad was not the problem. The problem was that NPM changed ownership of already existing package-names - which caused the left-pad owner to remove his packages in protest.
评论 #29521410 未加载
评论 #29521770 未加载
评论 #29521340 未加载
评论 #29522498 未加载
评论 #29521530 未加载
nonameiguessover 3 years ago
The funny thing about this is the Unix philosophy is just about keeping functional units small, separate, and theoretically independent of each other. It says nothing about the granularity of packaging for end users. Nobody has ever, to my knowledge, individually provided each Unix utility in its own package. A GNU system has most stuff in coreutils, with most everything else in findutils, binutils, and util-linux on Linux systems. Only grep, awk, and sed are single-tool packages among the POSIX utilities. In BSD systems, one base package contains the entire POSIX toolchain.<p>The idea of having a gigantic &quot;utils&quot; package like this, or even a batteries included standard library like Ruby and Python, is perfectly in keeping with Unix philosophy. The point is not have a single executable that does everything, but you can provide many executables and shared objects in one addressable package with a common version, a single build, and a monorepo.
评论 #29521575 未加载
kayodelycaonover 3 years ago
Ruby has truly ruined me for stuff like this. Most basic functionality and some non-trivial functionality is covered in the standard library. And if for some reason Ruby doesn’t have enough Rail’s ActiveSupport probably has you covered.<p>But Ruby is quite famously a batteries included language and its libraries follow in that philosophy. Solve the entire problem, not tiny pieces of it.
评论 #29521441 未加载
评论 #29523256 未加载
young_unixerover 3 years ago
I don&#x27;t think the Unix philosophy makes too much sense for things other than CLI commands, and even there, I&#x27;m not 100% convinced.
评论 #29521573 未加载
评论 #29521580 未加载
评论 #29521757 未加载
评论 #29525323 未加载
评论 #29522478 未加载
codesectionsover 3 years ago
This is the followup to Following the Unix philosophy without getting left-pad, <a href="https:&#x2F;&#x2F;raku-advent.blog&#x2F;2021&#x2F;12&#x2F;06&#x2F;unix_philosophy_without_leftpad&#x2F;" rel="nofollow">https:&#x2F;&#x2F;raku-advent.blog&#x2F;2021&#x2F;12&#x2F;06&#x2F;unix_philosophy_without_...</a>
msieover 3 years ago
Raku, mentioned in the blog, was formerly Perl 6.
jancsikaover 3 years ago
&gt; The idea of black box abstraction is that you can implement some complex functionality, box it up, and expose it to the outside world so carefully that the world can totally ignore the implementation details and can care only about the inputs and outputs.<p>Is there such a thing as &quot;glass box&quot; abstractions? :)
评论 #29525370 未加载
JohnHaugelandover 3 years ago
The Unix Way is small, replacable single purpose binary tools that are vendor blind.<p>This seems to be the exact opposite.
eternityforestover 3 years ago
How about we minimize the UNIX philosophy instead?