473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Repository of C code

Hi everyone

I was at an open source conference in Brisbane, Australia not so long
ago, and I can recall a few individuals discussing starting up a C
equivalent of CPAN (i.e. a large centralised repository of C code).

So I thought I might ask people on clc - whether such a thing exists
already?

Chris
Dec 21 '07 #1
14 1775
Khookie wrote:
Hi everyone

I was at an open source conference in Brisbane, Australia not so long
ago, and I can recall a few individuals discussing starting up a C
equivalent of CPAN (i.e. a large centralised repository of C code).

So I thought I might ask people on clc - whether such a thing exists
already?
snippets.org

Dec 21 '07 #2
On Dec 20, 9:05 pm, Khookie <chris.k...@gmail.comwrote:
Hi everyone

I was at an open source conference in Brisbane, Australia not so long
ago, and I can recall a few individuals discussing starting up a C
equivalent of CPAN (i.e. a large centralised repository of C code).

So I thought I might ask people on clc - whether such a thing exists
already?
Not really. There just isn't any culture for that sort of thing in
the C programming language. You need only look to the C library to
see how the language encourages mediocrity error, with no regard to
scalability or robustness. I mean what would such a collection be
building on top of?

I've written a few things here and there that some people have taken
up (a string library, a stdint.h replacement, some square root code, a
CSV parser and a hash function that people apparently can't get enough
of.) Ben Pfaff has written some Red-Black tree thing that apparently
gets used. But there just doesn't seem to be a critical mass of such
stuff that's enough for people to want to put it together to continue
to build/support a culture for C programming. C has really just
become a language for (embedded) systems drivers and virus writers.

You would probably be happier with C++. They started with STL, and a
lot has been added via "Boost". The way forward with C can only be
through C++. C itself is basically heading in the direction of COBOL,
and thus its hard to motivate a community to build something like CPAN
or Boost for it.

--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/
Dec 21 '07 #3
On Dec 21, 12:40*am, Paul Hsieh <websn...@gmail.comwrote:
On Dec 20, 9:05 pm, Khookie <chris.k...@gmail.comwrote:
Hi everyone
I was at an open source conference in Brisbane, Australia not so long
ago, and I can recall a few individuals discussing starting up a C
equivalent of CPAN (i.e. a large centralised repository of C code).
So I thought I might ask people on clc - whether such a thing exists
already?

Not really. *There just isn't any culture for that sort of thing in
the C programming language. *You need only look to the C library to
see how the language encourages mediocrity error, with no regard to
scalability or robustness. *I mean what would such a collection be
building on top of?
Not to mention the problem of coming up with even a loose standard for
packaging and build information that everyone will be happy with. Not
even 'make' is portable enough, I think. The Windows guys want
something that Visual Studio, Dev-C++, or MinGW can build (depending);
the Unix guys want make(1)files and don't like being told not to use
POSIX, and the end users just want pretty 3D effects...
I've written a few things here and there that some people have taken
up (a string library, a stdint.h replacement, some square root code, a
CSV parser and a hash function that people apparently can't get enough
of.) *Ben Pfaff has written some Red-Black tree thing that apparently
gets used. *But there *just doesn't seem to be a critical mass of such
stuff that's enough for people to want to put it together to continue
to build/support a culture for C programming. *C has really just
become a language for (embedded) systems drivers and virus writers.
But have you written an obscenely-fast blit-scale algorithm in
assembler yet that beats my Cyrix-tuned implementation by a factor of
2? ;)
You would probably be happier with C++. *They started with STL, and a
lot has been added via "Boost". *The way forward with C can only be
through C++. *C itself is basically heading in the direction of COBOL,
and thus its hard to motivate a community to build something like CPAN
or Boost for it.
There is probably room in the C community for a project like Boost,
but it would, at least initially, need very strong and motivated
leadership, for two reasons. One, to write the initial family of
libraries and set an example of the level of excellence (or lack
thereof) expected, and two, to keep the project moving. C is not
dead, but it's rather unlikely that The C Community, fragmented as it
is between vendors and platforms, will suddenly pull together without
some seed to start from.
Dec 21 '07 #4
Paul Hsieh said:
On Dec 20, 9:05 pm, Khookie <chris.k...@gmail.comwrote:
>Hi everyone

I was at an open source conference in Brisbane, Australia not so long
ago, and I can recall a few individuals discussing starting up a C
equivalent of CPAN (i.e. a large centralised repository of C code).

So I thought I might ask people on clc - whether such a thing exists
already?

Not really.
And Snippets doesn't count because...?

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Dec 21 '07 #5
Richard Heathfield wrote:
Paul Hsieh said:
>On Dec 20, 9:05 pm, Khookie <chris.k...@gmail.comwrote:
>>Hi everyone

I was at an open source conference in Brisbane, Australia not so
long ago, and I can recall a few individuals discussing starting up
a C equivalent of CPAN (i.e. a large centralised repository of C
code).

So I thought I might ask people on clc - whether such a thing exists
already?

Not really.

And Snippets doesn't count because...?
Presumably they are not "professional" enough. :-)

Seriously though, there exists C code for doing just about anything, but
something like CPAN or Boost hasn't emerged, perhaps for various
reasons. Close alternatives are GLib and Apache Portable Runtime.

C culture predates Internet and the "integrated solutions" that are very
popular for the past two decades. Additionally, C is strongly
influenced by UNIX, which encourages a mix and match "toolbox"
approach, rather than comprehensive solutions.

Despite this, something like Boost or CPAN would be very useful, but
it's unlikely to happen.

Dec 21 '07 #6
santosh said:

<snip>
Seriously though, there exists C code for doing just about anything
Right. So perhaps all that is needed is a Well-Known Portal.

<snip>

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Dec 21 '07 #7
On Dec 21, 1:37 am, Richard Heathfield <r...@see.sig.invalidwrote:
Paul Hsieh said:
On Dec 20, 9:05 pm, Khookie <chris.k...@gmail.comwrote:
Hi everyone
I was at an open source conference in Brisbane, Australia not so long
ago, and I can recall a few individuals discussing starting up a C
equivalent of CPAN (i.e. a large centralised repository of C code).
So I thought I might ask people on clc - whether such a thing exists
already?
Not really.

And Snippets doesn't count because...?
Because I've never seen a snippet of code on that site that I didn't
think was either totally trivial, or which I preferred to rewrite
myself? Plus there's no structure or common idioms or direction that
that codebase represents. I don't know much about CPAN, but STL and
Boost are unified under a single source base, and present algorithms
and templates that can work well together in a sensible and scalable
way.

If all you want is code snippets in C, then koders.com or www.google.com/codesearch
is your answer. But I hardly see how those are useful in the same way
that STL or Boost or CPAN is.

--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/
Dec 21 '07 #8
In article
<dd**********************************@b40g2000prf. googlegroups.com>,
Khookie <ch********@gmail.comwrites
>Hi everyone

I was at an open source conference in Brisbane, Australia not so long
ago, and I can recall a few individuals discussing starting up a C
equivalent of CPAN (i.e. a large centralised repository of C code).

So I thought I might ask people on clc - whether such a thing exists
already?

Chris
No it doesn't.

C has been around for so long and is used for so many different things
that there are many repositories for C code. Many run their own
libraries and examples most of the MCU vendors, compiler makers, dev kit
makers, various web sites for specific things like CAN or 8051.com

The C community is far to big and diverse to centralise and many would
not want to do it anyway.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Dec 21 '07 #9
On Dec 21, 1:55*am, Richard Heathfield <r...@see.sig.invalidwrote:
santosh said:

<snip>
Seriously though, there exists C code for doing just about anything

Right. So perhaps all that is needed is a Well-Known Portal.

<snip>
C collections are scattered all over the place. You have to look for
numerical code in one place and data structures code in another, etc.
I usually start with Sourceforge when I want to find something and
then switch to google for some more hunting. When those fail, I have
a few dozen other places to look.

I think that the reason CPAN and BOOST don't exist for C is that it is
almost impossible to create them. We had this discussion before about
creating a generic data structures and algorithm library for C ["C
needs a BOOST"], and the general consensus was that it was too
difficult. With Perl and C++ there are generic fascilities for
creation of algorithms and data structures that make this sort of
thing much more feasible. That is why you will *never* see a CPAN
sort of repository for C. It can't be done.
Dec 21 '07 #10
user923005 said:
C collections are scattered all over the place. You have to look for
numerical code in one place and data structures code in another, etc.
Hence my suggestion for a single Well-Known Portal - so well-known that
everyone would know to try it first when looking for libs.
I think that the reason CPAN and BOOST don't exist for C is that it is
almost impossible to create them. We had this discussion before about
creating a generic data structures and algorithm library for C ["C
needs a BOOST"], and the general consensus was that it was too
difficult.
The library is easy. It's the consensus that's difficult. Getting everyone
to agree on an interface is a Sisyphean task.
With Perl and C++ there are generic fascilities for
creation of algorithms and data structures that make this sort of
thing much more feasible. That is why you will *never* see a CPAN
sort of repository for C. It can't be done.
The obstacles are not technical, but political.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Dec 21 '07 #11

"Richard Heathfield" <rj*@see.sig.invalidwrote in message
>
The library is easy. It's the consensus that's difficult. Getting everyone
to agree on an interface is a Sisyphean task.
There's oodles of code on my site.
Recently someone ported the BASIC interpreter to an embedded platform. I've
had a couple of thanks for the options parser and csv file loader, and
someone else asked for the source to suicide chess, which I hadn't posted.

However the number of hits on the source files is never very high, and it is
hard to know what is actually useful.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Dec 21 '07 #12
Chris Hills wrote:
Khookie <ch********@gmail.comwrites
>>
I was at an open source conference in Brisbane, Australia not so
long ago, and I can recall a few individuals discussing starting
up a C equivalent of CPAN (i.e. a large centralised repository of
C code).

So I thought I might ask people on clc - whether such a thing
exists already?

No it doesn't.

C has been around for so long and is used for so many different
things that there are many repositories for C code. Many run
their own libraries and examples most of the MCU vendors, compiler
makers, dev kit makers, various web sites for specific things like
CAN or 8051.com

The C community is far to big and diverse to centralise and many
would not want to do it anyway.
Many people maintain some portion of their own code in a public
place. You can look, evaluate the accuracy and clarity, not to
mention usefulness, and grab what you want. In my case you want
the download section of my page.

--
Merry Christmas, Happy Hanukah, Happy New Year
Joyeux Noel, Bonne Annee.
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>

--
Posted via a free Usenet account from http://www.teranews.com

Dec 21 '07 #13
user923005 <dc*****@connx.comwrote:
On Dec 21, 1:42=A0pm, Richard Heathfield <r...@see.sig.invalidwrote:
user923005 said:
C collections are scattered all over the place. =A0You have to look for
numerical code in one place and data structures code in another, etc.
Hence my suggestion for a single Well-Known Portal - so well-known that
everyone would know to try it first when looking for libs.
I think that the reason CPAN and BOOST don't exist for C is that it is
almost impossible to create them. =A0We had this discussion before about=
creating a generic data structures and algorithm library for C ["C
needs a BOOST"], and the general consensus was that it was too
difficult.
The library is easy. It's the consensus that's difficult. Getting everyone=
to agree on an interface is a Sisyphean task.

But that's just it -- writing an algorithm with a generic interface in
C is a difficult task.
I'd put the emphasis differently: C is used for tasks for which writing
a generic interface which is both useful for enough applications _and_
efficient enough is difficult. C++ apps can often afford to spend
microseconds deciding which container handler to use. C programs can't.

Richard
Dec 24 '07 #14
On Fri, 21 Dec 2007 14:43:43 -0800 (PST), user923005
<dc*****@connx.comwrote:
<snip>
Another advantage of C++ for this sort of thing is ... syntactic sugar ...
For instance,

if (a < b) {/* do stuff */}

compared to:

if (compare(a,b) < 0) {/* do stuff */}

hardly seems any simpler. But when you have a page full of this kind
of stuff, it becomes much easier to grasp in the more compact
notation. Now, in C++ we are going to have to write a whole MESS of
operator overloads to get the same functionality as a compare()
function:
operator < [ and <= and == and >= and and != ]
but once you have done the work, the ease in notation makes
programming more natural [at least in the large.]
<OT C++Nit: Actually for well-behaved cases you only need to write
operator== and operator< and <utilityfills in the others.

This doesn't damage your point, obviously.

- formerly david.thompson1 || achar(64) || worldnet.att.net
Dec 30 '07 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: games60 | last post by:
Hi, I have a xml file and i want to make the repository of it so that i can fire queries on it to extract the data i need from the XML file. Does anyone know how to make the XML repository....
2
by: E.T. Grey | last post by:
Hi, I am using CVS as my file repository for some VC projects. Does any one know which of the solution related files I need to store: i.e., do I need to store the files with these...
0
by: yenlin.liu | last post by:
Who is the owner of the ebXML Registry Repository? Since The ebXML Registry Repository stores many business profiles and business scenarios. Companies can upload/download data from the ebXML RR....
2
by: Lars | last post by:
Hello, Anynoby knows a content repository similar to Content Repository for Java? I want to use a content repository without dependency of the storage system. I want to use file system or...
0
by: Sean Chambers | last post by:
This is a fairly simple architecture question, just can't seem to wrap my head around the answer. I am using NHibernate 1.2 from the trunk to leverage generics support. I have a User Table...
11
by: HMS Surprise | last post by:
Greetings, Could someone point my muddled head at a/the python repository. I know that one exists but cannot find it again. In particular I am looking for a standalone search tool that given a...
4
by: rahatekarabhijeet | last post by:
Hi, I have seen that some modules which are available on CPAN are not listed in ActiveState repository. So those are not available to install by using ppm. I find out the way of adding adding...
0
by: =?iso-8859-1?q?KLEIN_St=E9phane?= | last post by:
Hi, I've looked http://www.umlgraph.org/ tools. I think it's great to generate UML Diagram from source code and comment's. I read there are "Python version" of this tools : PyUMLGraph...
1
by: Andy | last post by:
When I open a web project from a sandbox, Visual Studio reports: “The project you are trying to open is a Web project. You need to open it by specifying its URL path” The project is checked...
8
topher23
by: topher23 | last post by:
I have several forms and code subroutines that are common across the many databases that I support. The solution my predecessor, who built many of these databases, used was to put a copy of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.