DEV Community

Discussion on: CLibs: A Package Manager for C

Collapse
 
tobiassn profile image
Tobias SN

Not to be mean or harsh, but can’t one just use a regular package manager?

Collapse
 
noah11012 profile image
Noah11012

I'm not sure what you mean by a "regular" package manager. If you mean the package manager provided by a Linux distribution like Linux Mint or Manjaro, then yes, you can use that if you prefer.

However, creating packages that are Debian based (not sure how to create packages for Manjaro) takes a lot more work than simply adding a package.json file to your project. It's similar to spirit to using npm when creating/working on JS projects.

Collapse
 
tobiassn profile image
Tobias SN

Yes, it's a bit harder to package for Debian, but it's a one-time job, and you don't have to edit anything related to the packaging pipeline to add or remove files, as it's completely independent of one's build tools.

Thread Thread
 
noah11012 profile image
Noah11012

That is true, but CLibs is focused on small C libraries; typically no more than a few files. So, adding/removing files from the package.json is not a frequent issue.

If your library is much bigger than a few files, that I would recommend going with a regular package manager.

Thread Thread
 
tobiassn profile image
Tobias SN

But then what’s the advantage with small libraries?

Thread Thread
 
noah11012 profile image
Noah11012

Small libraries are lightweight because of their small footprint. You're only using what you need and not having it coupled with a framework or part of a bigger library.

Of course, bigger libraries have their place in the world of programming, but sometimes one just needs a micro library to do the job.

Thread Thread
 
tobiassn profile image
Tobias SN

No, I meant what advantage does one get by having people install one’s package through CLibs?

Thread Thread
 
noah11012 profile image
Noah11012

A couple of reasons: the creator of CLibs states that libraries for C are scattered all over the web and CLibs can help them discover these types of libraries for themselves.

CLibs isn't required to be installed for the end users or contributors. This allows CLibs to seamlessly integrate with any new or existing projects.

Thread Thread
 
tobiassn profile image
Tobias SN

And how does it help people discover libraries any more than a simple Google search?

Thread Thread
 
noah11012 profile image
Noah11012

Again, CLibs helps to discover micro-libraries.

Thread Thread
 
tobiassn profile image
Tobias SN

You didn’t answer my question.

Thread Thread
 
noah11012 profile image
Noah11012

The author the library expressed the sentiment that the discovery of C libraries is "relatively poor" and sometimes they are unfocused and have a bigger than necessary footprint.

The point of CLibs is to use micro-libraries that meet your project's needs. Yes, a simple Google search might suffice for a bigger project, but for the search of smaller libraries, it might not.

Personally, I don't use CLibs, mainly because I only have one project in C. The reason I made this post is so that other people would know about and perhaps some of them would find a use for it.

Thread Thread
 
tobiassn profile image
Tobias SN

Still, what does it do to make discovery easier?

Thread Thread
 
noah11012 profile image
Noah11012

Just by using clib search [package-name]. Sure, you could Google search it, but, it might not come up.

Thread Thread
 
tobiassn profile image
Tobias SN

But you still need to know about the library to do that, so it’s more of a “Can I install this through CLibs?” thing.

Thread Thread
 
noah11012 profile image
Noah11012

Sure. If you want to, Google can be a great place to find certain libraries and for others, it might not be.

There's nothing wrong with wanting to use Google for this purpose, it's just that CLibs can offer another channel for finding useful libraries.

Thread Thread
 
tobiassn profile image
Tobias SN

Now you’re basically just repeating yourself.

Thread Thread
 
noah11012 profile image
Noah11012

Sorry, but that's all I have to say in this discussion. Use Google if you want and CLibs for an extra avenue for finding libraries.