1,217 karma · joined July 16, 2014
The only thing I can find on it though is this IEEE document reference: http://ieeexplore.ieee.org/document/6136696/
struct foo
{
int field1;
int field2[10];
}
Then an access like: fooptr->field2[index]
Would compile to: fooptr + sizeof(int) * index + offsetof(struct foo, field2)
Which is: lea $4(fooptr,index,4)So if you write:
a = 4 * b + c + 10;
It will be optimised to a single instruction like: lea 0xa(%rsi,%rdi,4),%rax
Rather than the more naive: imul $0x4,%rdi,%rax
add %rsi,%rax
add $0xa,%raxNot at all. Seeing errors like "ect", use of the wrong words like the all-too-common mix-up of "then" and "than", and even the omission of dots in things like "eg" and "ie" is very jarring to me. It usually pulls me out of automatic reading in order to consciously work out what the author actually meant. Even when I've worked it out, I find it hard to substitute the real meaning for what's literally there. Not that I necessarily blame the author, as I understand that mistakes do happen, but it does noticably harm readability for me.
I do find your description of your preference on assistive technology very interesting, as it differs from the preferences expressed by my visually impaired friends. They get varyingly amused and annoyed by their screen readers not understanding idiomatic things and reading them too literally. I wonder if the difference is that you're the kind of technical person that reads Hacker News, whereas they're both arty types who don't really do computers any more than the average person does. I suspect that were I to ever need to use a screen reader, I'd prefer the dumb ones like you do.
Personally I always try to re-write sentences that use "e.g.", "i.e." or "etc.", as I think they're symptomatic of lazy writing. There's usually a much better way to write what you're trying to say. Similarly with excessive use of parenthetical clauses.
Since people get it wrong, and there are more natural ways of writing these, these guidelines seem quite reasonable.
For banks, for example, I already have a banking app on my phone (which was originally authenticated via, ahem, SMS), so they could very easily put the OTP generator there.
I maintain that if tabs are permitted, so are other ASCII control codes, like vertical tab, form feed (which is actually used in GNU code), and bell.
int foo(void)
{
<TAB>/* <BEL><BEL><BEL> This bit is really important. */
<TAB>...
}
<VT>
int blah(void)
{
<TAB>...
}
<EOT>
<EM>
:-)Checkmate.
With the exception of assert(ptr != NULL) assertions, I think most of the ones I've hit have actually been completely duff, and with some thought could just be removed. I dread to think what would happen if I grepped the commit histories of all the projects I've worked on for "removed duff assert".
http://www.nytimes.com/2000/06/15/technology/pentagon-lets-c...
The errors you see in your mobile phone's positioning are due to signal problems (reflections, etc) and the relatively limited capabilities of the cheap GPS radio in your phone. A decent GPS receiver with a well-positioned antenna will get a highly accurate clock.
I've personally seen several (flags & MASK != VALUE) bugs make it to the field. Sometimes it's worked for ages as the 0th bit was part of what was being tested.
Whilst adding more brackets can be useful to explain things, there comes a point when you have too much parenthesis. You have to rely at least a little on operator precedence, so you really do need to learn it.
Take a look at section 6. There's a flowery sentence that says no more than "Add word to vocabulary" (completely pointless if this were a method called "add_word" on a class named "Vocabulary") and then a dense chunk of completely unexplained code.
The worst program I've ever had to maintain was written in funnelweb. It was a large, complicated program, so the funnelweb-generated documentation was tens of thousands of pages long. Nobody was ever going to read that. Trying to find out what you needed to modify to fix a bug was impossible from that document. Most developers I know looked at the woven C code (after all, that's where the line numbers in the stack trace pointed to), and worked from there.
If he had indeed meant that, he should have written
x = ~x + 1;
GCC, even with optimisation turned off, will turn that into a negl instruction.http://www.transportsfriend.org/road/guards.html
I expect those would have helped in this situation, as the car would have impacted the guards (and thus it would be a normal collision), rather than having its top sliced off.
Even that just postpones the problem, as grade inflation continues. I expect we'll see A* * before long, and then eventually grade sheets will look like eBay reviews, and students will just get a star count.
How many survived with zero food?
Also specify -MP on the GCC command line, which causes GCC to emit an empty rule for all the header files, like this:
foo.o: foo.c foo.h bar.h
foo.h:
bar.h:
Alternatively, you can write a generic empty header creation rule: %.h:
Which has the same effect. %.o: %.c
$(CC) $(CFLAGS) -MMD -c $<
-include $(OBJECTS:.o=.d)