Linux-Development-Sys Digest #121, Volume #7 Sun, 29 Aug 99 20:14:11 EDT
Contents:
Re: why not C++? (Michael Schuerig)
Kernel compile problem with (P)GCC 2.95 (Andreas Spengler)
Q: Create a small kernel - howto (ilan Bloch)
qualitylinks, need something, find something (JMV Nederhof)
Re: Q: Create a small kernel - howto (Paul Sherwin)
Re: Linux Fortran ("Rex Klopfenstein, Jr.")
Include file conflicts (repost) (Ken Booth)
Re: why not C++? (Stephen E. Halpin)
Re: why not C++? ([EMAIL PROTECTED])
Re: The optimization debate (was: why not C++?) (Stephen E. Halpin)
Re: why not C++? (Don Waugaman)
Re: Q: Create a small kernel - howto ([EMAIL PROTECTED])
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Michael Schuerig)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Date: Sun, 29 Aug 1999 13:54:10 +0200
<[EMAIL PROTECTED]> wrote:
> Spike! <[EMAIL PROTECTED]> wrote:
> >Tristan Wibberley <[EMAIL PROTECTED]> wrote:
> >>> BTW, has anyone read Stroustrup's paper where he suggests overloading
> >>> the whitespace operator? It's quite an elegant idea, for example
> >>> mathematicians would be able to write:
> >>>
> >>> v = a x + b y + c z;
> >>>
> >>> instead of the usual:
> >>>
> >>> v = a * x + b * y + c * z;
>
> Why doesn't it surprise me that Stroustrop came up with this lame idea.
Someone has to get caught each time that paper is mentioned. Yes, it
really does exist. And, yes, it's really been written by Stroustrup.
But...
> For a man that had the opportunity to clean up the C syntax and make it
> more readable yet managed the impressive task of making it even more of an
> dogs dinner than it already was, he really should have learnt his lesson by
> now.
You can bet that similarity to C was instrumental in the widespread
adoption of C++. If it were not to offer some kind of compatibility to
existing C code, it wouldn't be nearly as widely used as it actually is.
There's a similar effect with Java.
> I just wish academics like him would crawl back into their ivory towers
> and shut the doors for good since they seem to forget that programming
> languages are tools to be used by people, not machines, and therefor should be
> as syntactically clear as possible, not look like line noise.
How long does someone have to be in industry so that you don't consider
them an "academic" in your derogatory sense? No, sorry, but the design
of C++ has above all been driven by practical concerns.
> NJR (a C/C++ programmer for 15 years)
About time to reconsider your preconceptions.
Michael
--
Michael Schuerig
mailto:[EMAIL PROTECTED]
http://www.schuerig.de/michael/
------------------------------
Date: Sun, 29 Aug 1999 14:54:43 +0200
From: Andreas Spengler <[EMAIL PROTECTED]>
Subject: Kernel compile problem with (P)GCC 2.95
Hi folks,
I recently upgraded my compiler to GCC 2.95 and now whenever
I try to compile a kernel (tried it with 2.3.11-15 and 2.2.9) and do
a make bzlilo, towards the end I get the warnings
Warning; using %eax instead of %ax due to ..... ???
When I reboot the system the kernel hangs at
Uncompressing Linux. OK. Booting kernel......
>From then on I �ve to press the reset button to reanimate my system.
Does anyone know why this happens ???
Greets,
Andreas Spengler
------------------------------
From: ilan Bloch <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux,comp.os.linux.development
Subject: Q: Create a small kernel - howto
Date: Sun, 29 Aug 1999 17:00:33 +0300
Hi all,
I would like to use an old 486 as to share an internet connexion for a
LAN.
So far so good. Now to get things a little more interesting I thought of
making a light kernel that would fit on a couple of floppies. The point
is that the only service i want on that box are all the networking
related services and especially IPChains (kernel 2.2.x)
Now here's the question : do such kernel already wander around ? Thanks
for the links. or once I've used my existing RH6 to compile a new
lighty, how do I install it from the floppy on an empty box ?
TIA for all hints
ilan
------------------------------
From: JMV Nederhof <[EMAIL PROTECTED]>
Subject: qualitylinks, need something, find something
Date: Sun, 29 Aug 1999 21:27:11 +0200
==============095B74E1E5F94AA9F14DA1C4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
qualitylinks, need something, find something
need some linux resources or something else? check out
http://qualitylinks.virtualave.net and find everything you need!
know a good link that isn't located on the site? mail it to the
webmaster!
thank you
==============095B74E1E5F94AA9F14DA1C4
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<a href="http://qualitylinks.virtualave.net">qualitylinks, need something,
find something</a>
<br><a href="http://qualitylinks.virtualave.net">need some linux resources
or something else? check out</a>
<br><a href="http://qualitylinks.virtualave.net">http://qualitylinks.virtualave.net
and find everything you need!<br>
know a good link that isn't located on the site? mail it to the webmaster!</a><a
href="http://qualitylinks.virtualave.net"></a>
<p><a href="http://qualitylinks.virtualave.net">thank you</a></html>
==============095B74E1E5F94AA9F14DA1C4==
------------------------------
From: [EMAIL PROTECTED] (Paul Sherwin)
Crossposted-To: comp.os.linux,comp.os.linux.development
Subject: Re: Q: Create a small kernel - howto
Date: Sun, 29 Aug 1999 20:00:06 GMT
On Sun, 29 Aug 1999 17:00:33 +0300, ilan Bloch <[EMAIL PROTECTED]>
wrote:
>Hi all,
>
>I would like to use an old 486 as to share an internet connexion for a
>LAN.
>So far so good. Now to get things a little more interesting I thought of
>making a light kernel that would fit on a couple of floppies. The point
>is that the only service i want on that box are all the networking
>related services and especially IPChains (kernel 2.2.x)
>Now here's the question : do such kernel already wander around ? Thanks
>for the links. or once I've used my existing RH6 to compile a new
>lighty, how do I install it from the floppy on an empty box ?
>
I don't understand this. Are you interested in building a small
_kernel_? This is only relevant if you are very short of memory - say,
4Mb or less. If you want to build a small _system_ to go onto a small
HD, you can probably get a text mode Slackware system with networking
and a C compiler in about 80Mb - 60 if you don't need C.
2.2 kernels are generally larger than 2.0 kernels for the same
functionality, so you might want to do IP masqerading without IPChains
and use a 2.0 kernel.
If you want a system which will run from floppies only, there are a
number of distributions out there which do different things. My
favourite is tomsrtbt which is an excellent diagnostic tool, amongst
other things. I don't have an URL but if you search for 'tomsrtbt' you
should find plenty of sites. Many of the small Linuxes are on the
Cheapbytes 'Stampede Linux' cheap CD - look at
http://www.cheapbytes.com, or in Europe
http://www.linuxemporium.co.uk.
Best regards, Paul
Paul Sherwin Consulting 22 Monmouth Road, Oxford OX1 4TD, UK
Phone +44 (0)1865 721438 http://www.telinco.co.uk/psherwin/index.htm
Mobile +44 (0)7931 578334 mailto:[EMAIL PROTECTED]
Pager +44 (0)7666 797228
------------------------------
From: "Rex Klopfenstein, Jr." <[EMAIL PROTECTED]>
Subject: Re: Linux Fortran
Date: Sun, 29 Aug 1999 15:10:12 -0400
Reply-To: [EMAIL PROTECTED]
Thanks for the response. I am going to try the g77 compiler, might have to tweek
the code though!!
>
> Let me quote the French: "En principe, oui", which is a French phrase
> meaning "No."
>
--
Rex Klopfenstein, Jr.
Bowling Green, OH
[EMAIL PROTECTED]
http://www.wcnet.org/~rklopfen
------------------------------
From: Ken Booth <[EMAIL PROTECTED]>
Subject: Include file conflicts (repost)
Date: Sun, 29 Aug 1999 16:30:21 -0500
==============2A4266E10B483D0AC41C965D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I'm still looking for an answer to this question:
I recently started using RH5.2 and everything worked O.K. until I tried
to compile a couple of things: diald and ssh.
With both I get numerous warnings like this:
/usr/include/linux/in.h:35: conflicting types for `IPPROTO_RAW'
/usr/include/netinet/in.h:45: previous declaration of `IPPROTO_RAW'
also:
/usr/include/asm/byteorder.h:22: conflicting types for `ntohl'
/usr/include/netinet/in.h:204: previous declaration of `ntohl'
Looks like the common factor is /usr/include/netinet/in.h
Can anybody tell me what's going on and how to fix it?
(I know what's going on from the compiler's point of view - I need to
know if this problem is inherent in the distro and where to find the
correct files)
--
Regards, Ken
I AM.
==============2A4266E10B483D0AC41C965D
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi,
<p>I'm still looking for an answer to this question:
<p>I recently started using RH5.2 and everything worked O.K. until I tried
to compile a couple of things: diald and ssh.
<br>With both I get numerous warnings like this:
<p><tt>/usr/include/linux/in.h:35: conflicting types for `IPPROTO_RAW'</tt>
<br><tt>/usr/include/netinet/in.h:45: previous declaration of `IPPROTO_RAW'</tt>
<p>also:
<p><tt>/usr/include/asm/byteorder.h:22: conflicting types for `ntohl'</tt>
<br><tt>/usr/include/netinet/in.h:204: previous declaration of `ntohl'</tt>
<p>Looks like the common factor is <tt>/usr/include/netinet/in.h</tt>
<p>Can anybody tell me what's going on and how to fix it?
<p>(I know what's going on from the compiler's point of view - I need to
know if this problem is inherent in the distro and where to find the correct
files)
<p>--
<br>Regards, Ken
<p>I AM.
<br> </html>
==============2A4266E10B483D0AC41C965D==
------------------------------
From: [EMAIL PROTECTED] (Stephen E. Halpin)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Date: Sun, 29 Aug 1999 22:00:19 GMT
On Sun, 29 Aug 1999 13:54:10 +0200, [EMAIL PROTECTED] (Michael Schuerig) wrote:
><[EMAIL PROTECTED]> wrote:
>
>> Spike! <[EMAIL PROTECTED]> wrote:
>> >Tristan Wibberley <[EMAIL PROTECTED]> wrote:
>> >>> BTW, has anyone read Stroustrup's paper where he suggests overloading
>> >>> the whitespace operator? It's quite an elegant idea, for example
>> >>> mathematicians would be able to write:
>> >>>
>> >>> v = a x + b y + c z;
>> >>>
>> >>> instead of the usual:
>> >>>
>> >>> v = a * x + b * y + c * z;
>>
>> Why doesn't it surprise me that Stroustrop came up with this lame idea.
>
>Someone has to get caught each time that paper is mentioned. Yes, it
>really does exist. And, yes, it's really been written by Stroustrup.
>But...
>
>> For a man that had the opportunity to clean up the C syntax and make it
>> more readable yet managed the impressive task of making it even more of an
>> dogs dinner than it already was, he really should have learnt his lesson by
>> now.
>
>You can bet that similarity to C was instrumental in the widespread
>adoption of C++. If it were not to offer some kind of compatibility to
>existing C code, it wouldn't be nearly as widely used as it actually is.
>There's a similar effect with Java.
The fact that there were no restrictions on the use of the language
also helped. Entities weren't free to write competing implementations
of Objective-C or Eiffel for some time, allowing C++ to become the most
widely available object oriented language. Personally I think this more
than anything is responsible for the widespread use of C++. As for Java,
its lack of formal pointers makes it fundamentally incompatible with C -
that it uses braces instead of begin/end, etc... should be noise to a good
developer. I used more than ten languages during my undergraduate years,
so I'm not terribly tolerant of the notion that all languages have to look
like C to be usable or viable.
>> I just wish academics like him would crawl back into their ivory towers
>> and shut the doors for good since they seem to forget that programming
>> languages are tools to be used by people, not machines, and therefor should be
>> as syntactically clear as possible, not look like line noise.
>
>How long does someone have to be in industry so that you don't consider
>them an "academic" in your derogatory sense? No, sorry, but the design
>of C++ has above all been driven by practical concerns.
I dont know any academics who would want to take the blame for this
language. The grammar is insanely large (the yacc output of GCC's C++
grammar is nearly nine times that of the C grammar), and the number of
ways you can implicitly call other functions without the slightest hint
to the reader is rediculous. Code is indeed written once to be read
many times, and C++ defies this principle in a seemingly infinite
number of ways.
That said, C++ can be used to build efficient, large scale systems,
and could be used to build a reasonable kernel. Knowledgeable
engineers who can select an appropriate subset of C++ can produce
code which can be even faster than C code and make it more readable
in the process. It has also proven to be an effective language to
develop large scale, distributed real-time systems. Its just a tool,
and in the right hands, can be used to good effect.
>> NJR (a C/C++ programmer for 15 years)
>
>About time to reconsider your preconceptions.
>
>
>Michael
>
>--
>Michael Schuerig
>mailto:[EMAIL PROTECTED]
>http://www.schuerig.de/michael/
-Steve
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Date: Sun, 29 Aug 1999 21:31:23 GMT
[EMAIL PROTECTED] (Michael Schuerig) wrote:
>> For a man that had the opportunity to clean up the C syntax and make it
>> more readable yet managed the impressive task of making it even more of an
>> dogs dinner than it already was, he really should have learnt his lesson by
>> now.
>
>You can bet that similarity to C was instrumental in the widespread
>adoption of C++. If it were not to offer some kind of compatibility to
I've no doubt it was.
>existing C code, it wouldn't be nearly as widely used as it actually is.
>There's a similar effect with Java.
My point was that he's added even more pointless and obscure things to C++
such as reference variables. What the hells the point of those when you
already have pointers? Also overloading the << and >> to produce a less
powerfull (for most things) I/O system than *printf and *scanf and to
produce confusing statements like "cout << 2 << 3". In general IMO
operator overloading produces impossible to follow code and the syntax for
declaring an overloaded operator is a joke as are other things such as
class inheritance. Also why give constructor functions the same name as the
class and make destructors have a tilda in front? Even worse the copy
function is the same as the constructor except it takes an argument!
Whats wrong with constructor() , destructor() and copy() for chrissake??
I could go on but whats the point. C++ is a dogs dinner like I said before.
>How long does someone have to be in industry so that you don't consider
>them an "academic" in your derogatory sense? No, sorry, but the design
>of C++ has above all been driven by practical concerns.
Bullshit. The only practical part was building it on top of C. The rest of
it was made up by stroustrop , probably with very little input from anyone
who might have to use the language for real.
>About time to reconsider your preconceptions.
I think not. Just because C++ is used by lots of people doesn't make it a
good language syntactically anymore than billions of people buying Big Macs
makes the burger upmarket cuisine. Sure C++ has power but so what? So does
assembler.
NJR
------------------------------
From: [EMAIL PROTECTED] (Stephen E. Halpin)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: The optimization debate (was: why not C++?)
Date: Sun, 29 Aug 1999 22:18:32 GMT
On 28 Aug 1999 18:07:27 GMT, [EMAIL PROTECTED] (Christopher Browne) wrote:
>On 27 Aug 1999 12:03:05 +0100, Paul Flinders
><[EMAIL PROTECTED]> wrote:
>>[EMAIL PROTECTED] (Paul D. Smith) writes:
>>> On a micro level, I believe the best way is to write the code the most
>>> straightforward way possible first, _then_ when it all works, come back
>>> and see where you can tweak it to be faster. Remember, slower, working
>>> code is always better than faster, broken code.
>>
>>That's true unless the very slowness _is_ the breakage.
>>
>>Also with more multimedia stuff fast but not completely accurate can be
>>preferable to slow but complete (i.e would you prefer speech recognition
>>which ran in real time but which occasionally got it wrong to speech
>>recognition which took 5 minutes to recognise 10 seconds speech but always
>>got it right).
>
>Slower, working code that reads in a straightforward manner, which
>thereby makes it easy to make code transformations, is easier to
>optimize than slightly faster code where bits have been tuned, and
>thereby are virtually non-modifiable.
I think you missed the point of the previous poster. He is not talking
about "slightly faster code", he is talking about a 30:1 difference using
heuristics to produce results which are probabalistically correct. You
cant do it everywhere, but where you can do it, its a win. Another
example of what the previous poster was getting at is lossy compression,
where MPEG can produce far better compression ratios for audio and video
than lossless compression schemes can, and its an acceptable tradeoff
in many cases. On the other hand, you wouldnt store your company's
financial data using a lossy compression algorithm.
More to the point you make, there are times when slightly faster is
the difference between working and not working in a hard real-time
system, and you have to live with it. Its all part of the tradeoffs
that an engineer must make. If you havent seen the code for a box
where 100% of code and data memory are used and it runs hard real-time
at >98% utilization, its quite a sight :->
>--
>"Some sins carry with them their own automatic punishment. Microsoft is
>one such. Live by the Bill, suffer by the Bill, die by the Bill."
>-- Tom Christiansen
>[EMAIL PROTECTED] <http://www.ntlug.org/~cbbrowne/lsf.html>
-Steve
------------------------------
From: [EMAIL PROTECTED] (Don Waugaman)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Date: 29 Aug 1999 15:29:10 -0700
Sigh. I enter yet another language flamewar.
I have little hope of convincing anyone who has followed this far, least
of all NJR whose opinion is expressed so vehemently. However, there are
some parts of his post I'd like to touch on, along with some blatant
errors in fact I'd like to correct.
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
[ snips ]
>My point was that he's added even more pointless and obscure things to C++
>such as reference variables. What the hells the point of those when you
>already have pointers?
References are extremely important for use with operator overloading
and templates. I'll moan about operator overloading later; the use of
templates and generic programming is quite possibly the most powerful
and farthest-reaching use of the C++ language, and the absence of
reference variables would weaken templates to the point of near-uselessness.
References also cannot be induced to point to NULL in a strictly-conforming
program, which can eliminate a lot of checking of input conditions (or more
practically, since most C routines don't check their input parameters
anyway, can make the use of such routines much more reliable).
> Also overloading the << and >> to produce a less
>powerfull (for most things) I/O system than *printf and *scanf and to
>produce confusing statements like "cout << 2 << 3".
C++ I/O is considerably more powerful and less error-prone than the
various C equivalents. It provides a number of capabilities that are
extremely difficult to engineer code for in C:
- type-safe I/O
- I/O of user-defined types is syntactically equivalent to that of
builtin types
- redirecting I/O to user-created data sinks / data sources is
syntactically identical to I/O builtin data sinks/streams
- facilitated error checking, including delaying error checking/reporting
None of these are the case with C I/O.
If you mean that C++ I/O is confusing for former C programmers, I'd have
to agree - I come from a C background, and it's taken me a long time to
get used to the conventions of C++. However, C++ allows the ability to
create I/O systems that would have been easily visuallized in C but utterly
impossible to engineer in any maintainable manner - a few short lines of
code can redirect output of an array of user-defined types to a pipe,
string, network socket, or serial port, utterly impossible in C without
major reengineering, after which you'd get a set of functions and structs
that do pretty much what C++ does, except with more confusing syntax -
see GNU libio for details.
> In general IMO
>operator overloading produces impossible to follow code and the syntax for
>declaring an overloaded operator is a joke as are other things such as
>class inheritance.
Operator overloading is, in a sense, an unfortunate part of the C language,
because it is easily abused by beginners yet (because of its use in the
standard "hello world" program) it is often the first aspect of C++ that
those who come from C notice. This high visibility coupled with a high
potential for abuse means that a lot of programmers have made some very
unfortunate choices for when to use operator overloading.
Of course, no programming language I know of insulates the user from the
consequences of poor design decisions. C++ gives the coder a lot more
tools to work with, which increases the number of design decisions
required - getting some wrong is part of the learning process, but getting
them right can create some amazingly beautiful, powerful and maintainable
software.
Could anyone care to illustrate a better syntax for expressing class
inheritance?
> Also why give constructor functions the same name as the
>class and make destructors have a tilda in front? Even worse the copy
>function is the same as the constructor except it takes an argument!
>Whats wrong with constructor() , destructor() and copy() for chrissake??
What if there were a class where those member functions would make more
sense in another context? Perhaps a PhotoCopier object that had a member
function to make a copy of a piece of paper rather than a copy of the
object. The best member function name has been taken by the language.
Using the class name as the name of the constructor seems like a perfectly
suitable decision to me. Given that the tilde symbol is a commonly used
symbol for inversion, its use as the reverse of a constructor is suitable.
>I could go on but whats the point. C++ is a dogs dinner like I said before.
It appears that what NJR dislikes about C++ is the syntax, which has
likely turned him off to the power and expressiveness of the language as
a whole. Perhaps he would like to continue with other objections about
C++ since the previous set is rather unconvincing.
>Bullshit. The only practical part was building it on top of C. The rest of
>it was made up by stroustrop , probably with very little input from anyone
>who might have to use the language for real.
This is in error. From the start, Stroustrop had a great deal of input
from many others regarding the design of C++, including those at Bell Labs
and other establishments who used the language extensively. Some of
Stroustrop's own suggestions for language enhancements have been shot
down by the C++ community as a whole. C++ is not a one-man show, though
Stroustrop's contributions have been both seminal and significant.
Readers who would like to know more about how C++ was designed are invited
to refer to _The Design and Evolution of the C++ Programming Language_.
>I think not. Just because C++ is used by lots of people doesn't make it a
>good language syntactically anymore than billions of people buying Big Macs
>makes the burger upmarket cuisine. Sure C++ has power but so what? So does
>assembler.
So does a Turing machine. However, I'd hate to write a large piece of
software in either of the last two.
C++ is not a perfect language - for example, it's devilishly hard to
learn, has some extremely convoluted declaration syntax, and suffers
much from its inheritance from C - but the criticisms made in this
posting are not merited.
--
- Don Waugaman ([EMAIL PROTECTED]) O- _|_ Will pun
Web Page: http://www.cs.arizona.edu/people/dpw/ | for food
In the Sonoran Desert, where we say: "It's a dry heat..." | <><
All extremists should be taken out and shot.
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux,comp.os.linux.development
Subject: Re: Q: Create a small kernel - howto
Date: Sun, 29 Aug 1999 23:12:48 GMT
Reply-To: [EMAIL PROTECTED]
On Sun, 29 Aug 1999 17:00:33 +0300, ilan Bloch <[EMAIL PROTECTED]>
wrote:
>Hi all,
>
>I would like to use an old 486 as to share an internet connexion for a
>LAN.
>So far so good. Now to get things a little more interesting I thought of
>making a light kernel that would fit on a couple of floppies. The point
>is that the only service i want on that box are all the networking
>related services and especially IPChains (kernel 2.2.x)
>Now here's the question : do such kernel already wander around ? Thanks
>for the links. or once I've used my existing RH6 to compile a new
>lighty, how do I install it from the floppy on an empty box ?
>
>TIA for all hints
>
>ilan
Do a search for the Linux Router Project. They are doing just what you
want.
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************