Re: OT: Requesting C advice

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

 



On Wed, 2007-05-30 at 15:34 -0500, Mike McCarty wrote:
Rick Stevens wrote:
> On Wed, 2007-05-30 at 14:31 -0500, Mike McCarty wrote:
> 

[snip]

>>>As far as the libraries are concerned, the initial draft of what was in
>>>the standard C library made the library so damned big that it wouldn't
>>>fit in the standard process memory footprint of a VAX at the time.
>>
>>Care to substantiate that? As far as the Standard is concerned, it does
>>not address packaging issues.
> 
> 
> I'm talking about the very, very early days of discussing just what goes
> in the libraries--and indeed how many libraries there were going to be.

Ok. Your use of the term "standard C library" is somewhat irregular,
then. That term now has a specific defined meaning. But if that is
what you meant, then fine.

> The working document we had put almost everything in a single library.
> When we implemented it as a test case on the two most common systems we
> had (a PDP-11 and a VAX), the linker couldn't handle the library size.
> Indeed, without segmenting the program and using overlays, the famous
> "hello world" program couldn't fit on a VAX.  Overlays worked, but it
> was spectacularly slow.

One of the first C implementations I used was one on the IBM PC for
PCDOS, with a limit of 64K total code+data. Ever try using overlays on
a two-floppy system? I have.

Grrr, grrr, grrr, was a sound which frequently came not only from the
floppy disc drives, but from other sources as well :-)

[snip]

> 
> As I said, I wasn't there at the end.  The money was an issue, but also
> many of the meetings simply degenerated into finger-pointing sessions. 
> As Charles Shultz once stated in "Peanuts": "Beneath the calm exterior
> lurk the dynamics of a nursery school recess."  All in all, C is a great
> language, but it does have warts.  It's a giraffe...a horse designed by
> a committee.

Plauger and I exchanged a few e-mails during that period, and
he made comments of a similar nature. I got to meet him over
on comp.lang.c 'way back. I'm sure he doesn't remember me, though.

I am somewhat jealous of your getting to know Plauger.  I did implement PASCAL from the diagrams in the back of the book, and it took some time to do it.  I was working on a CPM based system by then, and only had one single density hardsectored disk drive from Northstar.  It took a while.  I wrote the byte tiny pascal system and an editor and debugger that would all fit in 64 K without overlaps or reloads.  I don't now remember the program size.  I do remember that my video board overlaid some of the ram, so I didn't really have 64K, but since it was character based display, it wasn't too much to pay.
The disk drive would hold 70K.  I still have it, I think.  I brought the case (real steel with its own powersupply) into the house thinking I might use it to hold some kind of backup drive.  It would power several of today's multihundred gigabyte disks.  Don't know if I will attempt it or not.  That linear supply is probably quite a power hog.  But it sure is built like a sherman tank.

    As to the C stuff, thanks, mike, that comment from the standard about the machine may be what mislead me.  Also the way that I implemented my original C compiler may have been unique.  I just don't remember any more.  I do remember the joy in my heart when I did the "Hello World!" program and it really worked.  By that time I had bought a nice Morrow Microdecision with two floppy disk drives.  Quite the machine at the time.  some 5 years later I bought my first PC, a 386 running at I think 35 or 40MHz.  And on it I used the very first commercial compiler I had ever had, It was a very nice C package from I think Brown Bag software.  How about that for a name from the past.

    Now here I sit with two systems at my disposal, and the "archaic" one is 10 times faster with 2000 times as much memory, and the "good one" is dual processor with so much power it boggles my mind.  What a difference a few decades makes.

    But C is portable.  Just in this thread, we have discussed it running on z80, 8080 up to Xeon processors, AMD, PDP, VAX, DEC, and IBM mainframes.  What a tribute to Kernigan and Ritchie.  Wonderful system, and beautiful to code in.  So close to the native machine, and yet so expressive.  It was truly inspired.  I have used other languages, from BASIC to APL (which is probably the most arcane you can get) and even Cyber systems, but I prefer the simple elegance and efficiency of C whenever possible.

    I also remember the big-endian vs little-endian arguments, and some of the consternation that caused.  And the arguments about re-entrant code, and variable wipes.  C never initializes, so there was a huge contingent that wanted to initialize things, but when this was attempted, it broke some things and made some peoples code even more obscure.  I also remember the arguments over self modifying code, and even remember seeing some C code that did just that, and was capable of porting across platforms with the same performance.  Try that in assembly.  It was and is amazing what a talented mind can do with C.

Regards,
Les H

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux