Remember .plan files?. I used to read John Carmack’s religiously.
Monthly Archive for July, 2005
I’ve had a minor revelation since my last two posts about C++. I don’t actually need the new auto keyword. Check it out:
#include
#include
#include
using namespace std;
using namespace boost;
void hello( int a )
{
while( a– ) cout << "Hi Mom: " << a << endl;
}
int main()
{
const int count = 5;
function< void (void) > func = bind( hello, count );
func();
}
I’m still not exactly sure how this works, but I’m positve that boost::function rocks.
Marketeers call it “mindshare.” Google says “don’t be evil.” I call it, “being cool.”
Cool: Apple, AMD, Google, Linux
Not Cool: Intel, Microsoft, SCO
Whatever you call it, it pays the bills. Here’s a business plan for you:
- Be Cool
- Profit
This, my friends, is the numero uno reason for businesses to stay the hell away from DRM. There is nothing more uncool than DRM. DRM is like kryptonite to your profits.
There is no market demand for DRM. Your customers don’t understand it, because it does nothing for them. They will not forgive you when it gets in their way.
Screw that DRM crap and just be cool already.
I’ve been thinking about my C++ problem.
I initially expected the return type of the bind expression would be void (*)(void). Obviously (well, it’s obvious now, anyway), this is not what bind returns. Rather, bind returns a function object (aka, a functor). A functor is just an object that implements operator(), making itself a “callable entity”. In my case, bind is returning a functor which implements void operator()(void) — which is similar, but not quite the same as a “nullary” function pointer void (*)(void).
So, what’s the type of the functor? Turns out it’s:
class boost::_bi::bind_t
Couldn’t be simpler than that, eh? How do I know this? The compiler tells me the type when it errors-out during compilation. And that is the most frustrating thing of all. The compiler knows the damn type, but there is no way for me to tell it, “Yes, yes! Just use one of those, thanks.”
At least, not until we get Dave Abraham’s new auto keyword.
I love C++, really I do, but damn my head hurts.
#include
#include
using namespace std;
using namespace boost;
void hello( int a )
{
while( a– ) cout << "Hi Mom: " << a << endl;
}
int main()
{
const int count = 5;
/*some type*/ func = bind( hello, count );
func();
}
The problem is, what the hell should go in place of /*some type*/? I expected void (*)(void), but that doesn’t work.
I love inventing terms for stuff that’s otherwise hard to describe. This one has been on the tip of my tongue for a while now: acronym assassination.
Considering the limited supply of TLAs and ETLAs, it’s pretty impossible to pick one that hasn’t already been used.
So, getting to the point, if you’re doomed to “overload” an acronym why not pick one that you hate?
For example, here’s an album by RIAA: Really Interesting Audio Adventures.
I love you.
Bruce Schneier has this incredible ability to tell it like it is. He says what I would say — if only my brain could fire the right sequence of neurons.
Take, for example, his latest blog entry:
In response to the London bombings, officials turned off cell phones in tunnels around New York City, in an attempt to thwart bombers who might use cell phones as remote triggering devices.
[...]
This is as idiotic as it gets. It’s a perfect example of what I call “movie plot security”: imagining a particular scenario rather than focusing on the broad threats. It’s completely useless if a terrorist uses something other than a cell phone: a kitchen timer, for example. Even worse, it harms security in the general case. Have people forgotten how cell phones saved lives on 9/11? Communications benefits the defenders far more than it benefits the attackers.
Amen. I wish our elected officials were this pragmatic and level-headed. I’m afraid nothing could be further from the truth.
The Patriot Act II will probably grant the FBI power to include tracking devices in all kitchen timers.
I’ve recently (in the last year) joined the ranks of a whole slew of guitarists who use their thumbs to fret strings. Besides the obvious benefits of having an “extra” digit, I’ve discovered that many chords are more comfortable to play this way.
This is not one of them: 6x354x
The idea here is to wrap your thumb around the neck and use it to fret the 6th string @ the 6th fret. Once you add the other fingers, you’ll find that your pinky is still available for hammer-ons, etc. In this case “available” should be read “could be used except for the crippling pain shooting thru your thumb.”
Quite possibly the hardest chord I’ve ever tried to play.
Last week AMD launched the Athlon 64 FX-57, which is currently our fastest shipping 8th-generation core at 2.8GHz. It’s also a “rev. E” core, which means it has a better memory controller, support for SSE3, and process improvements that reduce operating temperature.
I finally got around to reading some of the tech reviews and stumbled across this gem on HardOCP:
Why did we not take the time to compare an Intel CPU in our comparison? The simple fact of the matter is that while Intel would have you believe that they do make “gaming” processors, the AMD Athlon FX-57 simply kicks the crap out of anything Intel makes in the realm of gaming.
If you read HardOCP, you know that Kyle is anything but an “AMD fanboy”. Coming from him, the above carries some serious weight.

Latest Comments
RSS