[Gllug] Website developement

Stig Brautaset stig at brautaset.org
Sun Jul 15 20:32:18 UTC 2001


Nix <nix at esperi.demon.co.uk> writes:

> On 15 Jul 2001, Stig Brautaset uttered the following:
> > Nix <nix at esperi.demon.co.uk> writes:
> >> This is one that they are not supposed to solve. The C preprocessor
> >> can only sensibly handle C; any attempt to make it handle anything
> >> else (like Makefiles, hello imake, or X resources files) is a
> >> mistake.
> >> 
> >> You will find oddities happening, like the string `i586' collapsing
> >> to `1' in the expanded page;
> > 
> > Yes, I am aware of that.
> > 
> > I do not often use defined C/C++ keywords on my webpage, so this
> > problem is easily avoided by putting "#undef linux" (or whatever
> > keyword you need to write) somewhere in the file included. Simple.
> 
> You do this, and you haven't realised that this is saying something?
> (Like `cpp is the wrong tool'?)

Try "cpp is not the best tool", and I'll agree. But it works for
me. For now at least, and when it doesn't, I'll find something
else. It is that simple.

> (More problems: digraphs, trigraphs, /* sequences and the di- and
> trigraph equivalents to them, and backslashes will also fubar your
> preprocessing assumption of plain text. M4 has none of these problems.)

Digraphs and trigraphs I believe you have to switch on explicitly, and
anyway I do not use such combinations of letters. Where do you use a
backslash in normal text? Rarely, I'm sure, and there is always \
if I need it.

> FWIW, the set of potentially #defined symbols is not bounded, so in
> order to work safely you must #undef every single word you intend to
> write before you use it. *All* of them. If you don't do that, you'll
> have a webpage preparation system that could be broken by moving it from
> one system to another, or by upgrading the compiler.

Again, as stated in another post, have a look at my webpage and look
at the complexity of it. 

> > And yes, other problems like having to use " instead of " in the
> > source file, but you are supposed to do that anyway, so I really do
> > not see it as a problem. 
> 
> You never need to use # for anything, either?

Not to date, but # would suffice if I did. 

> >> it Just Won't Work like you want it to.
> > 
> > Speak for yourself; it does *exactly* what I need. 
> 
> In a thoroughly fragile fashion.

Yes, and that I am content with at the time.  But if (and according to
you, when) it breaks then I have an excuse for spending some time
tending my webpage, thusly healing it again. Now? I simply don't have time.

> >> (In fact, as of GCC-3.0, it won't work at all; `cpp -traditional' will
> >> work better than nothing --- that was kept working for the sake of
> >> imake.)
> > 
> > I have gcc 2.95.4 (how it relates to 3.0 I don't know, but it can't be
> > *that* far off)
> 
> (No, you don't; GCC-2.95.4 isn't released yet. You probably have
> something from the head of the GCC-2.95 branch in CVS.)

That's correct, it is a debian pre-release.

arwen:~$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20010703 (Debian prerelease)


> >                 and that works like a charm.
> 
> Querulous and fragile, with unknown function and who knows what snakes
> lurking under the surface?
> 
> If you are determined to use cpp to process things other than C, very
> well; it's your funeral. It's crazy, but you're the only person it'll
> hurt.

Look, it is noones funeral. Probably the only hits I get is from
myself, checking that the server it lives on is still up. 

> If you think that the preprocessor's behaviour on plain text is a good
> guide to its behaviour on C code, you are mistaken (because of the
> tokenization).

Ok, you have prooved your point, M$ is the way to go; I am stupid and
you are clever. Sadly, I am also a stubborn beast, and I believe that
my setup will serve me some time still. 

> (Experience with make you are getting. Experience with GCC, no, not
> really, just experience of the GCC driver program, which is being

Ok, I agree with at least this :P


Cheers, Stig
-- 
 21:16:04 up 22:56,  5 users,  load average: 0.00, 0.01, 0.00


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list