Profile cover photo
Profile photo
Joshua Cranmer
35 followers
35 followers
About
Joshua's posts

Transcoding failure: Gmail doesn't like non-UTF-8 messages + 8-bit encoding,

Post has attachment
It appears someone jumped in front of a train at the DC metro. Result?

http://twitpic.com/6yym4t
http://twitpic.com/6yymun

For the record, those escalators are the third-longest continuous span escalators in the world. Oh, and this was during rush hour...

Post has attachment
If more IT people did this, the world would be a better place. :-)

Post has attachment
Some interesting questions to ask people:
1. What requires you to be protected under the Constitution? A US citizen? A resident of the US? An action under the jurisdiction of the US legal system? Action by the US government?
2. Does the US have the right to target (shoot-to-kill) Anwar al-Awlaki?
3. Does the US have the right to target (shoot-to-kill) Osama bin Laden?
4. If the answers to number 2 and 3 differ, what is the difference between the two circumstances?

I must personally admit that my belief is that the provisions of the Constitution are more limited to U.S. soil, which means that the answers to 2 and 3 would both have to be yes; I can also understand it being a case of action by government, in which case the answers to 2 and 3 would both be no. But I wonder how many people would try to answer no and then yes and then attempt to justify it...

Post has attachment
The purported proof of Peano Arithmetic's inconsistency has been retracted. It is now safe to add again without wondering if you're violating mathematics!

MSVC is cracked up. On x86, this code:
#include <cstdio>
class A { char c;};
class B : public virtual A { public: void *p;};
B* x = new B[10];
int main() {
std::printf("%d\n", (int)(&x[0].p));
std::printf("%d\n", (int)(&x[1].p));
}

will print out:
1077836
1077845

Yes, the void* is not 4-byte aligned. To quote someone on cfe-dev:
So to be compliant with the C++ standard on x86-32 Windows, we can't assume any alignment on loads and stores.

It does appear, however, that the semantics under x86-64 are more sane.

Yet another random quiz time:

Write, in C, a function which takes a function pointer as an argument. This function will rewrite the function at the function pointer to always return 1. You may assume that said function returns a parameter of type int, follows the standard C ABI, is on an x86 or x86_64 based machine, and already returns a constant (i.e., the load for the return value is a constant). You may also assume that you are running Linux, and you may not assume that the .text section has been mapped in RWX.

Yes, it can be done.

College == "Let's make you fill out paperwork for an entire week before you can do anything useful like register for classes."

Ideas to reduce the deficit:
1. Every emergency spending bill (any spending not offset under paygo rules) causes an automatic cut of all pay in the government while it is in effect. These cuts stack.

S & P downgrades US debt. Practical effects.... probably little.
Wait while more posts are being loaded