Re: comparison between portability libraries?
- From: "cr88192" <cr88192@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 2 Apr 2006 18:18:11 +1000
"Friedrich Dominicus" <just-for-news-frido@xxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:8764lssc2r.fsf@xxxxxxxxxxxxxx
"cr88192" <cr88192@xxxxxxxxxxxxxxxxxx> writes:can't see what would be that hard.
"Friedrich Dominicus" <just-for-news-frido@xxxxxxxxxxxxxxxxxxxxxxx> wroteOk, let's see
in
message news:87sloxeha6.fsf@xxxxxxxxxxxxxx
well what's your opintion about diverse offers then?
- libapr
- libcurl
- libxml2
- libpcre
- glut
- glib
- libssl (eay)
most of these offer functionality that is imo a minor issue to
implement...
glib contains code for all kind of data structures, an minor issue to
implement?
maybe daunting, if one wants to implement everything, but one can implement
what they need, and thus need to implement less.
consider as a simple case, a hash table. I use these things all the time,
but I have pretty much never made any centralized code for them. why?
becuase, they are trivial to a point of not even needing to reuse the code.
the exact algo (hashing function, lookup and insertion behavior, ...) can be
varied for the particular use, but it is no big deal.
linked lists, are the same way. they can either be implemented in the
structures themselves, or externally (as in glib, lisp, ...). again, the
code is no big deal.
likewise with most of the other things there.
libssl offers minimal functionality?well, this is bending what I had said. I said "minor issue to implement" not
"minimal functionality". something can be easy to implement, and do a whole
lot, or be hard to implement, and do little.
encryption is not impossible to implement. sufficiently detailed
descriptions are not that hard to find.
libssl, however, is one where I might consider just using the library
(reason: a lot of algos are needed to be able to really negotiate).
concievably, one could do their own and only support, say, rc4, but the
security wont be there, and it won't work if, for whatever reason, the other
end doesn't know about rc4.
libcurl just contains code for handling all kind of download problems
yeah.
http is not that complicated of a protocol either. I did this myself once
before (writing both the client code and a server).
likewise, back when I wrote an os, I did all my own network code, and also
built the webserver into my kernel. however, the problem was my os's tcp
code was horridly slow, making using tcp for much of anything an unpleasant
task (part of my problem here was that I took a very questionable approach
to designing my network stack, eg, basing it around a number of
communicating threads, and putting the speed at which data flows at the
mercy of the scheduler...).
Why writing such code yourself? I would really like to see you regular
for something as simple as xml parsing, regexps, ... why risk a library
dependency?...
expression matching code.
in my case, I never really needed regexps, so I haven't implemented them. as
for other manner of parsing tasks (mostly c-style parsers, other customized
parsers, ...), have wrote enough of these.
So what why is that a problem?not really, then again, I doubt they will do me much good, as for
anything
one uses an external lib for, they need to make sure that lib is
available.
because, it is.
I personally get rather annoyed by software that I can't build because it
depends on libs which I can't get to build, or may in turn depend on other
libs that fail to build.
the software, in this case, often may as well not exist...
it is often easier to throw together one's own app than to try to understand
someone else's codebase enough to modify it so that it will work.
you may have enough time at you hands
my preference is, instead, to do things like this myself.
Not big loss? Interesting how much time have you spend to write such
sure, if my project has around an extra 100-200 kloc or so in basic
utility
code, then maybe that is a little much, but no big loss...
code and how many errors have you found.
haven't kept track of errors count, if anything, probably some huge
number...
my projects have been created over a number of years of fairly consistent
coding effort. a lot of it depends, eg, how much weight one would put on,
say, a years worth of coding (maybe a year coding on average for about 4
hours/day). this would be about 1460 hours, and for 100 kloc, one only has
to write about 68 loc/hr. this is a fairly light pace really.
now, it is rarely so even, more often it is maybe a few days without writing
much of anything, then maybe sitting around and writing a few kloc in a
single sitting (probably somewhere around 4-8 hours), followed by a lot of
time of writing code in smaller pieces, ...
most of the time is sat around pointlessly trying to think up what I am
going to do next, much more than is actually spent coding. writing misc code
(often to eliminate some annoying dependency, or improve on something
pre-existing) often can serve as a useful distraction, followed by making
actual progress once some issue has been resolved (or, I get around to
it...).
looking at it up front, that may seem scary, in retrospect (after the code
has been written already), it is no big deal. if I had to do it all again,
maybe I would have second thoughts, luckily I don't have to, so I can use
what I have written before.
pretty much anything, this code is self-contained.Portable between?
most of these features are small, eg:
file io (core) 431 loc;
the one just below it (directory fs code), uses mostly ansi c, and a few
posix calls (stdio stuff, stat, opendir/readdir, ...).
most of the rest of the code is pretty much self-contained.
I see your points.
Regards
Friedrich
--
Please remove just-for-news- to reply via e-mail.
.
- Follow-Ups:
- Re: comparison between portability libraries?
- From: Friedrich Dominicus
- Re: comparison between portability libraries?
- References:
- Re: comparison between portability libraries?
- From: Friedrich Dominicus
- Re: comparison between portability libraries?
- From: cr88192
- Re: comparison between portability libraries?
- From: Friedrich Dominicus
- Re: comparison between portability libraries?
- Prev by Date: Re: comparison between portability libraries?
- Next by Date: Re: comparison between portability libraries?
- Previous by thread: Re: comparison between portability libraries?
- Next by thread: Re: comparison between portability libraries?
- Index(es):
Relevant Pages
|