Why there is not a comprehensive c archive network? [closed]

允我心安 提交于 2019-11-27 05:55:51

问题


There are websites as collections of python/perl/R libraries. Why there is not an equivalent one for c?

I searched the internet and only found a small website calling itself CCAN. There are only a few libraries in that website.

If I need extra libraries for c programming, where can I find them? Is there an well organized website of the c libraries?

Thanks.


回答1:


If I need extra libraries for c programming, where can I find them? Is there an well organized website of the c libraries?

No known to me outside of CCAN.

The problem here is that C doesn't have any even loose specification for libraries. Compare that to e.g. packages in Java or Python or Perl.

And even then, C is quite bare bone itself leaving many things for libraries to implement themselves. I/O abstraction, memory management, multi-threading, OS integration - minor differences in how libraries work with any of the resources might make them incompatible, preventing them being used in the same project.

I have seen in past some 3rd party commercial libraries for C, covering quite a lot of functionality, but frankly I can't recommend them and honestly do not even remember their names - for they often were causing more problems than really helping. (OK, I'm lying: they were rarely causing unsolvable problems: it's the numerous workarounds which were causing often the problems later.)

Otherwise, for C you might want to check the Glib and (do not get me wrong) to also check the C standard as in my experience few actually know many of the utilities already in the standard library itself. And well, Google is your friend: lots of public domain code is there for you to simply throw as-is into your project.




回答2:


I don't know of anybody who's studied this in detail, though I would be curious to see the studies. I'm sure it has to do with the nature of the C programming community itself.

I think a large (maybe the primary?) part of the answer is: before the WWW, there was no such thing as a single resource for obtaining libraries for a particular language. People obtained their libraries, and knowledge of libraries, via many different means: through BBSes, mailing lists, newsgroups, and periodicals. The C community dates from this time, of course, and I've noticed a similar difference in culture regarding other languages from this period and before.

I think another part of the answer has to do with the general decentralization of C culture itself. There's no one C compiler, no one C development community, that serves as a hub and a potential point for projects to attach themselves to. And the C development community is huge, which further drives this decentralization and splintering.

In the case of C libraries, OS distributions actually do a pretty good job of collecting useful C/C++ libraries out there. (With the unfortunate exception of Windows, I believe.) They do a better job in these languages than most others, probably since C and C++ are such important systems languages on these platforms.

As far as CCAN goes, I think what would make a more worthwhile project, given the number of different distributors of C code out there, is to have a single site that links to the various libraries on their own native sites, rather than trying to get them to upload straight to CCAN. I think there's a use for this in and apart from Google, which will give you a lot of noise if you try just browsing for libraries. The question is, would you and the bulk of the C communities out there embrace such a site if it existed?

You might be amused to see how CPAN got its start: http://www.brainbell.com/tutors/Perl/CPAN_History.htm

CPAN evolved just as its community did. So the same thing could happen in the C/C++ world if the leadership and interest is there. But it hasn't happened yet.




回答3:


use http://www.google.com/codesearch?q=lang:%22C%22 variant of http://www.google.com/codesearch

=> i.e. add lang:"C" in the search query




回答4:


Use these web-sites:

  • Debian "Testing": Subsection libs
  • The Free Country: Free C/C++ Libraries
  • Free Software Directory: Category/Library
  • SourceForge Software Map: Software Development/Libraries/C
  • Upstream Tracker: List of C/C++ Shared Libraries



回答5:


There is a Maven-like repository and dependency management system called Biicode.
There isn't a huge collection of libraries on there yet, but you can add forks of open source projects yourself or inform original authors about it.

EDIT: the company behind biicode is dead

EDIT2: the spiritual successor seems to be conan.io




回答6:


There is a C package manager which looks promising called CLib:

github: https://github.com/clibs/clib

tutorial: https://dev.to/noah11012/clibs-a-package-manager-for-c-4jmi




回答7:


Why do you need a website for a collection of C libraries? Just use Google.



来源:https://stackoverflow.com/questions/3080696/why-there-is-not-a-comprehensive-c-archive-network

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!