Viewing profile — gandalf013
gandalf013
HN member- Joined
- Thu, Feb 06, 2014, 7:00 PM UTC
- HN karma
- 74
- Public activity
- 7 items
- HN profile
- View on Hacker News ↗
About gandalf013
No profile information was provided.
Recent public activity
-
comment
Comment #28117523
India's population is approximately 4.5 times that of USA, so the actual ratio is "one American is emitting 35 Indians worth of carbon emissions".
-
comment
Comment #24618350
bc calculator doesn't (or didn't) define pi, but has atan. I've used "4*atan(1) method" in bc to get pi.
-
comment
Comment #24051931
Hobbes: Do you have an idea for your project yet? Calvin: No, I'm waiting for inspiration. You can't turn on creativity like a faucet. You have to be in the right mood. Hobbes: Wha…
-
comment
Comment #14152540
A very common idiom is "T p = malloc(n sizeof *p)". That only works if sizeof doesn't evaluate its arguments.
-
comment
Comment #8087573
http://benpfaff.org/writings/clc/strncpy.html
-
comment
Comment #7193622
The standard actually specifies (or specified?) that the flexible array member must come after all the members, including the padding. But, from my reading, that wasn't their inten…
-
comment
Comment #7192329
A more correct version might be: #include int buf_offset = (int)offsetof(struct sdshdr, buf); struct sdshdr *sh = s - buf_offset; This is because the compiler might insert padding …