🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: demon.ip.developers
9 messages
9 total messages Started by John Washington Wed, 07 Oct 1998 00:00
Snews (+jlw): developer alert, src compatibility gone
#158
Author: John Washington
Date: Wed, 07 Oct 1998 00:00
41 lines
2507 bytes
The source at //www.wash.demon.co.uk/snews/bin/snews_src.zip is
likely to be the final version where I attempt to make the
changes between 'my' version and the Demon 'supported' version
1.30 explicit by using #ifdef directives.

If this is significant to you, I recommend you grab a copy of
it now.  I have no plans to keep it myself.

However, this new policy is unlikely to affect many (any?)
developers.  I do not intend abandoning #ifdef's wholesale,
quite the contrary.  But there are many places where the
benefits have been outweighed by the losses, specifically,
where large chunks of code have been functionally duplicated.
This has tended to confuse developers (certainly confuses
me, anyhow) making work slower and more error prone.

In particular, I expect to remove the 1.30 way of piecemeal
interpreting the .rc file, leaving only the newer table driven
code.  I expect to remove the 3 large sections in mail.c that
lead to (S)end (A)bort (E)dit, and are handled instead by a
single function.

At this time I don't expect to remove #ifdef's that show
actual changes to the user interface.

I shall continue to be very receptive to donations of modified
code.  Recent contributors have all marked their own changes
by #ifdef's and this has saved me a lot of work.  In future
I shall not be running any source comparisons, and will only
accept code with your changes marked (preferably by ifdef's).

I also intend detabbing the source.  Developers who knowingly
insert tabs in source should be severely caned unless they
have a very good excuse ("Please Miss, I only have 4K and a
Teletype").  Developers who don't know they're adding tabs
should be severely caned twice.

I haven't embarked on any of this yet, but it's only days away.
Any developers out there (or Frasier fans): "I'm listening!"

John Washington
Re: Snews (+jlw): developer alert, src compatibility gone
#159
Author: Robert Mortimer
Date: Thu, 08 Oct 1998 00:00
20 lines
1474 bytes
allegedly John Washington wrote <907755188snz@wash.demon.co.uk> :
>The source at //www.wash.demon.co.uk/snews/bin/snews_src.zip is
>likely to be the final version where I attempt to make the
>changes between 'my' version and the Demon 'supported' version
>1.30 explicit by using #ifdef directives.
>
>If this is significant to you, I recommend you grab a copy of
>it now.  I have no plans to keep it myself.

If John has no objection I'll keep a copy archived in with all the
other stuff on bob.lostsoul.org, just so it's handy in case like.

Speaking of which bob.lostsoul.org will be suffering an identity
crisis, this weekend before returning as copper.cauldron.org.

[snip]
-- 
Robm
873
    "Trust the computer the computer is your fiend"
Re: Snews (+jlw): developer alert, src compatibility gone
#160
Author: Nikki Locke
Date: Thu, 08 Oct 1998 00:00
19 lines
1735 bytes
In article <907755188snz@wash.demon.co.uk>, John Washington wrote:
> I also intend detabbing the source.  Developers who knowingly
> insert tabs in source should be severely caned unless they
> have a very good excuse ("Please Miss, I only have 4K and a
> Teletype").  

That's interesting. I thought it was "developers who use spaces for 
indentation, instead of exactly one tab per indentation level, should 
have their hands cut off".

If indentation is marked by tabs, each person reading the source can 
set the physical width of the indentation to suit themselves. They 
can also use proportional fonts if they wish (although I never 
would). If indentation is marked by spaces, the reader has no 
choices.

-- 
Nikki Locke, Trumphurst Ltd.      PC & Unix consultancy & programming
nikki@trmphrst.demon.co.uk            http://www.trumphurst.com/
Re: Snews (+jlw): developer alert, src compatibility gone
#161
Author: Peter Fokker
Date: Fri, 09 Oct 1998 00:00
16 lines
1387 bytes
In article <907936362snz@wash.demon.co.uk>
           john$@wash.demon.co.uk "John Washington" writes:

[...]

> And if you actually view the tabs themselves, you'll find plenty 
> of examples where a line starts with several spaces that are
> FOLLOWED by tabs.

So, how about a code beautifier then? ISTR that there are several
utilities out there that allow you to change spaces to tabs
and vice versa. So what's the problem? A single tab per indentation
level, whether it is 4, 5 or 8 characters per tab, suits me fine...
Adding comments like your case b) is "sub-optimal" anyway.

--Peter Fokker
Re: Snews (+jlw): developer alert, src compatibility gone
#162
Author: Tony Finch
Date: Fri, 09 Oct 1998 00:00
17 lines
1439 bytes
peter@fokker.demon.nl (Peter Fokker) wrote:
>
>So, how about a code beautifier then? ISTR that there are several
>utilities out there that allow you to change spaces to tabs
>and vice versa. So what's the problem? A single tab per indentation
>level, whether it is 4, 5 or 8 characters per tab, suits me fine...
>Adding comments like your case b) is "sub-optimal" anyway.

GNU indent is the canonical C reformatter -- a lot of people specify
that part of their coding standards with a collection of flags for
indent.

Tony.
-- 
 f.a.n.finch**waster
 dot@dotat.at
            fanf@demon.net
Re: Snews (+jlw): developer alert, src compatibility gone
#163
Author: Malcolm Muir
Date: Fri, 09 Oct 1998 00:00
20 lines
1771 bytes
On Fri, 09 Oct 1998 17:00:55 GMT, Tony Finch <fanf@demon.net> wrote:
>peter@fokker.demon.nl (Peter Fokker) wrote:
>>
>>So, how about a code beautifier then? ISTR that there are several
>>utilities out there that allow you to change spaces to tabs
>>and vice versa. So what's the problem? A single tab per indentation
>>level, whether it is 4, 5 or 8 characters per tab, suits me fine...
>>Adding comments like your case b) is "sub-optimal" anyway.
>
>GNU indent is the canonical C reformatter -- a lot of people specify
>that part of their coding standards with a collection of flags for
>indent.

Several times in its history saw that particular tool used on Snews
source !

-- 
Malcolm S. Muir                                Demon Internet Ltd.
Sunderland                                     322 Regents Park Road
England                                        London N3 2QQ
Re: Snews (+jlw): developer alert, src compatibility gone
#164
Author: Chris Croughton
Date: Sun, 11 Oct 1998 00:00
26 lines
2147 bytes
In article <907952455.3572.0.nnrp-02.c30b3753@news.demon.co.uk>
           fanf@demon.net "Tony Finch" wrote:

>GNU indent is the canonical C reformatter -- a lot of people specify
>that part of their coding standards with a collection of flags for
>indent.

The problem is that it doesn't handle C++, which SNEWS now is (was it
always?).  In fact it might handle all of the SNews source, it doesn't (as
I recall) use C++ constructs like classes which are the main things which
break indent.

If anyone knows of a C++ beautifier (or a version of indent which has been
hacked to handle C++) I would be very very interested - I've been
threatening to write my own for ages but not gotten round to it.

But you're right, that was my first thought - GNU indent not only handles
indentation (tabs or spaces) but can do other conversions, like the
position of braces (K&R where the opening { is on the same line as the
controlling if/for/while etc., indented to the same position as the
enclosed code, the same as the controlling statement wit the code inside
indented, etc.).  It's an invaluable program for anyone who 'inherits'
code with weird formatting, or who writes code and then finds that it
needs to be in a 'house' style, and me 'at's orf to the authors of it.

Chris C
Re: Snews (+jlw): developer alert, src compatibility gone
#165
Author: John Washington
Date: Sun, 11 Oct 1998 00:00
35 lines
2182 bytes
On Friday, in article <907947532snz@fokker.demon.nl>
     peter@fokker.demon.nl "Peter Fokker" wrote:

PF> In article <907936362snz@wash.demon.co.uk>
PF>            john$@wash.demon.co.uk "John Washington" writes:
PF> 
PF> [...]
PF> 
PF> > And if you actually view the tabs themselves, you'll find plenty 
PF> > of examples where a line starts with several spaces that are
PF> > FOLLOWED by tabs.
PF> 
PF> So, how about a code beautifier then? ISTR that there are several
PF> utilities out there that allow you to change spaces to tabs
PF> and vice versa. So what's the problem?

The problem is not the existing code, but the people who work
on such code.  Nikki suggested that leading tabs gives great
flexibility and is better than leading spaces.  I agree,
in so far as I'm confident that if Nikki and I were working
together, just the two of us, I'd be very happy with that
style.  My point is that there are too many people who don't
bother.  Nevertheless, those people are capable of creating
useful code.

Issuing source without tabs, such contributors' additions may
have tabs but the intended spacing is obvious and it only takes
a few seconds to remove them.

Issuing source _with_ tabs, undisciplined additions take me longer
to deal with.  But that may be symptomatic of my tools being
inadequate.  I'll look into that.  Better tools are always welcome
whether or not they change my views.

John
Re: Snews (+jlw): developer alert, src compatibility gone
#166
Author: Chris Croughton
Date: Wed, 14 Oct 1998 00:00
20 lines
1795 bytes
In article <908215552snz@wash.demon.co.uk>
           john$@wash.demon.co.uk "John Washington" wrote:

>:-(  And I'm probably not far off introducing classes, provided
>I can cope with BC++ 3.1 not having exception handling (coping
>with memory exhaustion during a constructor worries me).

Oh, can't it?  Of course, you can always do the traditional "out of
memory" action - exit...

>Me too.  Shirley that must be around?  It seems like such an
>obvious project.  In fact, come to think of it, a much more
>interesting project than working on Snews!

It is 'obvious', but the GNU people aren't interested (the 'official'
language of the GNU project is C, not C++, and it seems no-one is
interested in hacking indent to do C++; having looked at the code, nor am
I!).  I probably will end up writing one in self-defense sometime <g>...

Chris C
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads