20 comments

[ 2.0 ms ] story [ 54.3 ms ] thread
Ironic that a site espousing 0 dependencies recommends adding an off-site dependency to a project's README on GitHub.
Advertising, that one dependency we can't remove...
It's not a dependency. It's a manifesto, and it's not linked against the code.

A more moderate recommendation would be a request to audit your dependencies and keep the transitive dependency bloat to a minimum.

Ideally libraries do have dependencies (you don't want every author re-rolling filesystem, network, crypto, etc.). Transitive dependencies should look like the bedrock packages for the language: well-supported, well-vetted, and have lots of eyeballs on them.

You don't need left-pad, but you probably don't want your own implementation of byteorder.

I know I'm being pedantic but zero dependencies is impossible. I'm all for minimizing dependencies though.
not the OP, but zero dependencies is possible. Also zero dependencies has and can mean things a little differently depending on the context. Like your OS is a dependency. It is possible to have an application that does need an OS, yes and they exist. If a programming language is a dependency it's possible to write your own ect... Although generally people draw the line somewhere at something that is a common denominator for some environment.

Looking at the page it seems to more target towards library writers, if you draw the line at the programming language it's certainly possible to write useful libraries with no dependencies.

Unless you're writing bare-metal embedded code. Then it's possible to have 0 software dependencies.

You can provide your own freestanding portion of libc & crt0 if using C, then if desired use those to write your own memory management (`malloc`, `calloc`, `realloc`, and `free`), then use those to write the rest of your own libc.

This website depends on Google Fonts.

  <link href="https://fonts.googleapis.com/css?family=Source+Serif+Pro" rel="stylesheet">
lol, should have made their own typeface then.
I know you're semi-joking, but the obvious answer is that they could've just used system defaults. The Google fonts dependency is pretty silly. It's also a bit egregious when trying to make this kind of bold statement because the fonts are actually hosted on `fonts.gstatic.com` which is sometimes aggressively blocked by adblockers.
Even loading a font face onto their server would have been better for their message and may not have drawn attention at all.

Google Fonts is a convenience (one with a cost), not a requirement for being able to use a specific font on your page.

Yea I was joking. If they liked the font they should have hosted it.
Yeah, at least self-host the fonts... or just use system fonts
Depends on the language/standard library. For example in C if your library includes its own HTTP library that's probably not a plus.
I have tried many times in my project to do "zero dependencies" but I always ends up failing. It's pretty much... almost impossible? Let's say I want to create some web app, do I really need to write my own design system from the ground-up, or just use existing styles/CSS libraries/CSS frameworks? I personally choose the latter

The closest thing I've seen to do "zero dependencies" is esbuild, even then, last time I checked it has one dependencies in go.mod I think for old version's compatibility reason

What certain is, like the other commenter said, I believe in minimizing dependencies... not zero dependencies

Another nitpick: I hate the usage of `⓿` character. I wonder how this will be read by screenreader...

> the usage of `⓿` character

It gets casefolded to a 0.

reinventing the wheel for trivial things like progress bars and so on (e.g. tqdm) makes zero sense to me.
Look, if you're not writing your own OS & libc for every program you're just not trying hard enough. Dependencies are bad, and we must take this to the illogical conclusion.
I think this is bad advice. You can only be an expert in all the domains your program covers if the set of those domains is really small.

0 runtime dependencies though is another story - very helpful in deployments where your package manager doesn't solve it.