Discussion:
are the are C [or C++] src sites ....
(too old to reply)
Gary Kline
2010-04-10 15:19:38 UTC
Permalink
Sites of parts of websites that have example C functions?
[continuing from the ^Subject.

I have googled around and found practically nothing; yet, wen
I was looking for a math function I found at least two
places.

Rather than re-inventing the wheel over and again, wouldn't
it be nice to have a library of all kinds of functions?
--For kernel use, yes, they would need to be BSD specific...

ideas?

gary

PS: As if it weren't obvious, no i haven't had my morning
jolt of java yet....
--
Gary Kline ***@thought.org http://www.thought.org Public Service Unix
http://jottings.thought.org http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php
Chad Perrin
2010-04-10 17:35:53 UTC
Permalink
Post by Gary Kline
Sites of parts of websites that have example C functions?
[continuing from the ^Subject.
I have googled around and found practically nothing; yet, wen
I was looking for a math function I found at least two
places.
Rather than re-inventing the wheel over and again, wouldn't
it be nice to have a library of all kinds of functions?
--For kernel use, yes, they would need to be BSD specific...
ideas?
gary
PS: As if it weren't obvious, no i haven't had my morning
jolt of java yet....
I suspect there are quite a few examples of BSD-specific C functions *in*
the FreeBSD kernel. I'm pretty sure this isn't what you meant, though,
so please clarify.
--
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
Charlie Kester
2010-04-10 19:45:15 UTC
Permalink
Post by Gary Kline
Sites of parts of websites that have example C functions?
[continuing from the ^Subject.
I have googled around and found practically nothing; yet, wen
I was looking for a math function I found at least two
places.
Rather than re-inventing the wheel over and again, wouldn't
it be nice to have a library of all kinds of functions?
--For kernel use, yes, they would need to be BSD specific...
ideas?
gary
PS: As if it weren't obvious, no i haven't had my morning jolt of
java yet....
Did you try googling for "sample code"? I just did, and the results
contained several such websites.

Narrowing the search to "sample code c" or "sample code unix" yielded
even better results.

There are even some sites that you can use to search the vast body of
existing open-source code, to see how others have used (or implemented)
a given API.

No, I'm not going to name any specific sites. You now have enough of a
hint to find them on your own. ;-)
Gary Kline
2010-04-11 22:39:16 UTC
Permalink
Post by Charlie Kester
Post by Gary Kline
Sites of parts of websites that have example C functions?
[continuing from the ^Subject.
I have googled around and found practically nothing; yet, wen
I was looking for a math function I found at least two
places.
Rather than re-inventing the wheel over and again, wouldn't
it be nice to have a library of all kinds of functions?
--For kernel use, yes, they would need to be BSD specific...
ideas?
gary
PS: As if it weren't obvious, no i haven't had my morning jolt of
java yet....
Did you try googling for "sample code"? I just did, and the results
contained several such websites.
Narrowing the search to "sample code c" or "sample code unix" yielded
even better results.
There are even some sites that you can use to search the vast body of
existing open-source code, to see how others have used (or implemented)
a given API.
No, I'm not going to name any specific sites. You now have enough of a
hint to find them on your own. ;-)
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
i used more strict search terms and found around 30 sites.
none seemed that promising.

what i am thinking of is functions that work in any of
several venues:

math,
[every] science,
strings,
filenames,
queues,
stacks,
arrays,
<whatever>.

thanks for your insights. i used something like
"c-language functions" :-)

gary
--
Gary Kline ***@thought.org http://www.thought.org Public Service Unix
http://jottings.thought.org http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php
C. P. Ghost
2010-04-11 23:41:53 UTC
Permalink
       what i am thinking of is functions that work in any of
               math,
For maths, I'm particularly fond of GiNaC (+CLN)
FreeBSD ports: math/GiNaC, math/cln
WWW: http://www.ginac.de/ and http://www.ginac.de/CLN/

Of course, there's also the more traditional stuff like math/atlas[-devel]
which takes forever to compile. ;-)
               [every] science,
Very application specific.
               strings,
               filenames,
               queues,
               stacks,
               arrays,
If you're interested in C++ classes for all this, you could check
out the STL (Standard Templates Library), and additional libraries
like Boost.
               thanks for your insights.  i used something like
               "c-language functions"  :-)
That's way too broad to yield useful results! :-)

I'd suggest that you browse the ports collection for stuff you like
(domain oriented), and in most cases, the ports will point to some
library or program written in C or C++ that you can learn from. Just
looking for C/C++ code per se is kind of pointless (IMHO), if you're
not motivated by a particular application.

-cpghost.
--
Cordula's Web. http://www.cordula.ws/
Charlie Kester
2010-04-12 02:18:53 UTC
Permalink
Post by Gary Kline
i used more strict search terms and found around 30 sites.
none seemed that promising.
what i am thinking of is functions that work in any of
math,
[every] science,
strings,
filenames,
queues,
stacks,
arrays,
<whatever>.
thanks for your insights. i used something like
"c-language functions" :-)
gary
Try searching for 'algorithms'.

One of my favorite sites for that is the Stony Brook Algorithms
Repositor: http://www.cs.sunysb.edu/~algorith/

The Algorithm Design book associated with that site is also quite good.

But most good algorithms sites and books will have something on the
topics you list.
Andreas Maechler
2010-04-12 07:03:27 UTC
Permalink
Also consider http://www.google.com/codesearch which lets you search
through public code in many different ways.

Andy
Post by Charlie Kester
       i used more strict search terms and found around 30 sites.
       none seemed that promising.
       what i am thinking of is functions that work in any of
               math,
               [every] science,
               strings,
               filenames,
               queues,
               stacks,
               arrays,
               <whatever>.
               thanks for your insights.  i used something like
               "c-language functions"  :-)
               gary
Try searching for 'algorithms'.
One of my favorite sites for that is the Stony Brook Algorithms
Repositor: http://www.cs.sunysb.edu/~algorith/
The Algorithm Design book associated with that site is also quite good.
But most good algorithms sites and books will have something on the
topics you list.
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
Alejandro Imass
2010-04-12 16:34:32 UTC
Permalink
       Sites of parts of websites that have example C functions?
       [continuing from the ^Subject.
       I have googled around and found practically nothing; yet, wen
       I was looking for a math function I found at least two
       places.
       Rather than re-inventing the wheel over and again, wouldn't
       it be nice to have a library of all kinds of functions?
       --For kernel use, yes, they would need to be BSD specific...
       ideas?
When you install a lib in FBSD (and many other FLOSS OSs) it usually
installs a man page, so apropos and of course man will have it: man
sprintf, so the detailed information is usually there...

The tricky part is having like a table of contents of some sort
especially at the library level which is what _I think_ you are
referring to. For example, to answer the question ¿what library should
I use for X or Y need? . If you use Perl, you have the cpan search
engine (and others) wher you go llook for libs. For C it is many times
not tha obvious, nor is there a single repository of libraries for C
as there is for say Perl.

I find your question very interesting but sadly I have no direct
answer myself. I think is more of "a topic" thing in C. For example if
you are making a driver, you will usually be involved in mailing lists
related to that, and people will share X or Y lib secrets with you.
You will also hack someone else's code and look at the libs they are
using, and most importangly you will have books and other stuff that
will point to the use of those libs. Now whether there is a directory
of C libraries around, I don't think so, but if you find one, _please_
share it ;)

Best,
Alejandro Imass
       gary
       PS:  As if it weren't obvious, no i haven't had my morning
       jolt of java yet....
--
       http://jottings.thought.org   http://transfinite.thought.org
   The 7.79a release of Jottings: http://jottings.thought.org/index.php
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
Gary Kline
2010-04-13 02:05:04 UTC
Permalink
[[ ... ]]
Post by Alejandro Imass
When you install a lib in FBSD (and many other FLOSS OSs) it usually
installs a man page, so apropos and of course man will have it: man
sprintf, so the detailed information is usually there...
The tricky part is having like a table of contents of some sort
especially at the library level which is what _I think_ you are
referring to. For example, to answer the question ¿what library should
I use for X or Y need? . If you use Perl, you have the cpan search
engine (and others) wher you go llook for libs. For C it is many times
not tha obvious, nor is there a single repository of libraries for C
as there is for say Perl.
I find your question very interesting but sadly I have no direct
answer myself. I think is more of "a topic" thing in C. For example if
you are making a driver, you will usually be involved in mailing lists
related to that, and people will share X or Y lib secrets with you.
You will also hack someone else's code and look at the libs they are
using, and most importangly you will have books and other stuff that
will point to the use of those libs. Now whether there is a directory
of C libraries around, I don't think so, but if you find one, _please_
share it ;)
Best,
Alejandro Imass
I will, of course, share any info i find if it looks useful.
Most of my hacking-type work these days involves messing with
textfiles, and that may be of little interest since it is not
FBSD specific.

I'm still chasing after some sort of 'user-side' program that
will let people use cheap keyboards and produce a nice THUNK.
That said, I did try out one of the small 8.9" notebooks.
The keyboard 'feel' wasn't that bad. [Still, I didn't press
hard enough on several keys. Having audio would have been a
great help.]

Okay; enough. thanks to everybody; really appreciate the
feedback!

gary
--
Gary Kline ***@thought.org http://www.thought.org Public Service Unix
http://jottings.thought.org http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php
Loading...