Re: Thou shalt have no other gods before the ANSI C standard
From: Hank Oredson (horedson_at_earthlink.net)
Date: 02/12/05
- Next message: Nora Baron: "Re: Proof factoring solution is closed form"
- Previous message: Douglas A. Gwyn: "Re: Thou shalt have no other gods before the ANSI C standard"
- In reply to: Beth: "Re: Thou shalt have no other gods before the ANSI C standard"
- Next in thread: Douglas A. Gwyn: "Re: Thou shalt have no other gods before the ANSI C standard"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sat, 12 Feb 2005 01:54:29 GMT
"Beth" <sneezie@unlisted.net> wrote in message
news:110220051317263545%sneezie@unlisted.net...
> In article <1220.902T2081T13265678@kltpzyxm.invalid>, Charlie Gibbs
> <cgibbs@kltpzyxm.invalid> wrote:
>
>> In article <slrnd0o72o.1opp.usenet@stoneport.math.uic.edu>, djb@cr.yp.to
>> (D. J. Bernstein) writes:
>
>> > By the end of the course, 16 students had submitted 91 reports of
>> > security problems, mostly buffer overflows. I'm sure that the students
>> > wouldn't have been able to do this if I had spent the semester saying
>> > ``A byte might be 9 bits!''
>
>> "I'm keeping my index in a byte, so I might as well hard-code my
>> table size at 256 entries."
>
> The right way to handle this, of course, is to encapsulate the
> allocation of the table and to use a symbolic range, such as {0...255}
> or {1...256}, if you want to be persnickety, or {3...373}, if that's
> the range that's needed, and let the compiler worry about optimizing
> the range to the machine architecture.
>
>> > and ``Integers might be ones-complement!''
>
>> "I know the bit pattern for -1. Why should I waste time using a
>> predefined symbolic value?"
>
> I'm pretty sure you contradicted yourself here. As programmer I
> shouldn't need to care what the machine representation is, which is Dr.
> Bernstein's point, I think. I'm interested only in the symbolic value
> that is appropriate to my application.
Of course there is that little problem of writing, e.g., that memory
mapped I/O device driver. Oh! It takes 32 bits at once! I wonder
how the device maps what IT thinks to this Plexus machine it
is plugged into. What in heck did I do wrong by just writing my
32 bit saved register value to that device anyway?
-- ... Hank http://home.earthlink.net/~horedson http://home.earthlink.net/~w0rli
- Next message: Nora Baron: "Re: Proof factoring solution is closed form"
- Previous message: Douglas A. Gwyn: "Re: Thou shalt have no other gods before the ANSI C standard"
- In reply to: Beth: "Re: Thou shalt have no other gods before the ANSI C standard"
- Next in thread: Douglas A. Gwyn: "Re: Thou shalt have no other gods before the ANSI C standard"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|