[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] local groups, use as archive

On 16 Feb 2001, Matthias Andree wrote:

> phil hunt <philh@xxxxxxxxxxxxxxxxxxxxxx> writes:
> > > That's an implementation issue. The overall code quality in leafnode is
> > > not good, particularly, error detection and propagation leave much to
> > > desire.
> > 
> > I find the leafnode code hard to read; C functions spanning hundreds
> > of lines are not to my taste.
> Not to mine either, and it's not used securely, as macro assemblers such
> as C :*) seldomly are. Seriously, the ANSI-C libraries encourage unsafe
> programming, and some old APIs are really broken (gets - fixed buffer,
> no length limiting possible; fgets - does not report back the count of
> characters read, so you can't tell \0 from \n; string handling)

And before we had snprintf(), sprintf() had buffer lengthy problems.
> > Two I've used -- Agent and Turnpike -- both use proprietary formats.
> > Another one, KA9Q for DOS, used what look like a mailbox format 
> > (though that program is hardly ever used now).
> Ok, so an archive might be an option in leafnode later on. However, I'd
> really like to clean things up and get the cruft out, if it's not
> happening for 2.0, it's never happening...

I think this is probably accurate. I'd like to see the leafnode code
cleaned up. 
> I'm wondering if switching to C++ would buy us anything, because it
> would require reworking all APIs and group libraries functions and data
> structures into classes, but I'm not feeling like spinning of yet
> another leafnode derivative to try it, I don't have the time to do it;

If there was a group effort to do this, I'd be happy to lend a hand.

> and then again, a rewrite from scratch might be much cleaner, and
> Cornelius is not there at the moment to comment, and I presume he might
> not be too inclined to switch. C++ would bring some portability issues,

Would it? What?

My understanding is that gcc is portable, and runs on lots of platforms.

> and with some real passing around of classes, it gets a space and
> performance issue as well.

This depends entirely on how well-coded it is. Well-written C++ shouldn't
require any more resources performance-wise than well-written C.

> It might be like working around broken old
> STL,

If the STL isn't very good, we could always write container classes local
to leafnode; they aren't that difficult to do. (Which reminds me, I've
got a string/stream library to clean up and publish).

> working around old compilers and things, which would then
> compensate the advantages somewhat.

Would it not be possible to specify gcc as the compiler? Or use a
subset of C++ (e.g. no templates or exceptions) that gets round some
of the problems.

Leafnode could probably be re-written in Python quite
quickly; unfortunately performance would be too slow, I think.

***** Phil Hunt ***** 
"An unforseen issue has arisen with your computer. Don't worry your silly 
little head about what has gone wrong; here's a pretty animation of a 
paperclip to look at instead."
         -- Windows2007 error message

leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list