3 ms·
I noticed this comment: "When I reapply to jobs, I intend to put something similar on my resume, upper right corner. What exactly is still up in the air, but p
by nopassrecover 18y ago
I noticed this comment:
"When I reapply to jobs, I intend to put something similar on my resume, upper right corner.
What exactly is still up in the air, but perhaps something like a[5] == 5[a], More Magic, or 0x5f3759d5."
I get that "More Magic" is from this story (http://catb.org/esr/jargon/html/magic-story.html http://catb.org/esr/jargon/html/magic-story.html) and that "0x5f3759d5" is from Quake's Fast Inverse Square Root code (http://betterexplained.com/articles/understanding-quakes-fast-inverse-square-root/ http://betterexplained.com/articles/understanding-quakes-fas...).
I think a Steve Yegge post mentioned the equivalence of the a[5] == 5[a] principle but I can't seem to find any reference online expanding on this - anyone care to elaborate on this principle and/or possibly link the post if it actually exists?
- ivey 18y agoMy C is really weak (I'm a Ruby guy) but here's the best I can do. Two things make this work: 1, in C, an array can be treated like a pointer that points to the first element of the array. 2, pointers have a subscript notation. That is, for a pointer p, p[i] is the same is * (p + i). (where pointer addition goes by sizeof the thing pointed to). So, a[5] is really * (a + 5) ... and 5[a] is * (5 + a). Same thing, although 5[a] looks really weird and will make people hate you if you use it. http://www.ibiblio.org/pub/languages/fortran/append-c.html http://www.ibiblio.org/pub/languages/fortran/append-c.html was helpful in reminding me of the specifics, since I couldn't find my K&R.
- nopassrecover 18y agoAwesome thanks :-)