Hi Eric,
Hey, did I get you heated up 'cos I said, "I dont care!".
Well, I didn't mean any harm, you see. Still I shall say sorry
just in case i did I hurt your feelings or anything like that.
Please, please don't misunderstand me as I really, really
appreciate your help as I was really puzzled about that thing
almost since a day. I just hate to be misunderstood, although
I know its really easy to misunderstand me. As you have
yourself pointed that out and I myself had mentioned in the
first post itself, "in case i am not clear ...".
<floyd>
I can't explain, you would not understand.
This is not how I am.
<off-topic>
If you show the same regard for the rules of your
programming languages that you do for those of English,
I predict a short and inglorious career. It's about
communication, ashnoodle: Do you want to be understood,
or do you just want to arrange letters in artistically
interesting combinations? e e cummings you're not.
</off-topic>
Well, disclaimers aside, lets analyze a few of the things
that you had mentioned. I am not pretty sure about my
language rules, whether they be programming or literary.
Yeah, but you are correct on the basic issue, I do have a little
less regard for rules in general. As far as your predictions with
regard to my carrer are concerned, should I not say that you
are being a bit overbold and making certain far-fetched
assumptions. You, have not only terminated it pre-maturely but,
have defamed it also. I haven't even got a carrer yet and if you
are as good at making predictions as I certainly feel that you are
at programming, then I better be gravely concerned. Well, I just
do coding as a hobby and for pleasure, I am mostly more
interested in figuring out how and why things work rather than
accomplising anything seriously serious.
If you Really Truly Believe that you'll have no
trouble with struct padding or with endianness issues,
Hey, buddy I turst you for that that you shall be careful enough
and not land me up in trouble whatsoever. Well, I am a scientist,
or a to be one if you preffer that. As you know in science, there are
times when an its not possible to arrive at an exact solution to a
problem or even if its possible its too tedious and then then you
make certain assumptions to ease your burden. Even though you
know that they can lead to errors in the extreme conditions, but that
is a risk that you are willing to take in trade-off for the reduced
effort.
I find that thing pretty much justifiable. Well, getting a bit
technical
here for a moment, I feel that you would consider casting one
structure to another as equally dangerous thing to do. But, then one
routinely does that sort of thing while doing network programming.
So, is it that thoes structures are defined in manner that they can
never be misaligned. Secondly, let me rephrase my original query,
what would be the most efficient way (in terms of cpu clock cycles)
to copy contents of an structure (all members are of type char) into
an char array (of the same size), (a) you are willing to make
the above mentioned assumption and (b) you are not willing to make
any assumptions, however the total size of the individual members
of the structure is equal to the size of the array. Now, does one do
if he/she is severly limited by the processing power. Comming back
to the issue of rules, i feel that what you have mentioned is more of
a directive. It is perfectly legal to me the way I see things 'cos the
compiler doesn't even throw up a warning when you use that. BTW,
I am not atall trying to disregard the point that you have mentioned.
I love C for the fact that it gives you the power to do anything if you
understand what you are doing and otherwise it does anything if u
don't understand what you are doing and there by gives you an
opportunity to figure out what went wrong where and learn a hell lot
of things in the process. (In case you feel like saying that assembly
would be hell lot more powerful than C then just hang on for a while,
I basically don't disagree on that point.)
if you think all can be made well by clicking your heels
I just can't dance, I probably just wasn't build with the genes for
dancing included. I can probably attempt to sing but even then it
would be pretty lame for sure.
and reciting "There's no place like home," if you start
Yeah, you are actually quite right about that there is indeed no
place like home its just an artificial concept floated to keep people
perpetually delusioned.
each day by clapping your hands to keep Tinkerbell going,
then just dispense with the array of characters altogether:
do your I/O directly to and from an instance of the struct.
That way, at least, you can stop worrying about alignment.
That indeed is a really fabulous suggestion. I do admire
obfuscated c codes, even though I might not be able to
understand them fully.
<nonesense>
Hey, since I have already talked to you for so long let me share
some abstract philosophy with you. Well, it is mainly inspired from
the themes of movies of the class of Matrix (first one, not the reloded
and unloaded crap), though I always find it very amusing as to why
Hollywood has such a pessimistic view of the future. Anyways,
considering the facts, increase in processing power, advancement
in AI algorithms, etc. it is quite natural that machine intelligence
would
develop tremendously in the years to come and then one day you may
end up with machines that comunicate with humans directly and that
would make them extremely powerful creatures. Now all this coupled
with a few half-minded people like me who cast arrays into structures
and vice-versa might just result in a catastrophe, like the kind
perdited
in movies and a war may ensue between the humans and the
machines and in such a situation humans shall be severly limited by
there inability to effectively and quickly understand machine talk
while
machines would be capable to understand humans easily. Hence, I
propose that we should start to teach assembly to children right from
the primary school and by the time time they finish off their high
school they should be able to load a jpeg image into a text editor
and be able to admire its beauty.
</nonsense>
Bye,
Ash
P.S.: Do you find my arrangement of letter combinations
artistically interesting?
All of the above may be taken at a light note, I sometimes
just say whatever comes to my mind.
Read, "Catcher in the Rye" by J.D. Salinger, if you havent
already done so.