Skip to main content

Posts

Builtins in C

Here's an interesting article on Kuro5hin : Why C Is Not My Favorite Programming Language . The article is a response to a rant from Brian Kernighan (over 20 years ago) called Why Pascal Is Not My Favorite Programming Language . It's an interesting article and makes good points about the ability to introduce buffer overflows very easily. For the most part though, the article is simply complaining about the amount of rope that C gives you to hang yourself with. Or should I say shoot yourself in the foot . One of the comments in the article was trying to make an example of the C builtins. The one I found most interesting was the branch prediction builtin __builtin_expect which lets you assist the compiler is branch prediction. Documentation for some of the other interesting builtins is here .
The Elegant Universe : PBS has made available online all episodes on Nova on the Elegant Universe. Check them out here . It's nice to know that information is free and out there for everyone to enjoy.

Gentoo Humor

Someone posted this note about Gentoo on /: Gentoo Linux is an interesting new distribution with some great features. Unfortunately, it has attracted a large number of clueless wannabes who absolutely MUST advocate Gentoo at every opportunity. Let's look at the language of these zealots, and find out what it really means... Gentoo makes me so much more productive. Although I can't use the box at the moment because it's compiling something, as it will be for the next five days, it gives me more time to check out the latest USE flags and potentially unstable optimisation settings. Gentoo is more in the spirit of open source! Apart from Hello World in Pascal at school, I've never written a single program in my life or contributed to an open source project, yet staring at endless streams of GCC output whizzing by somehow helps me contribute to international freedom. I use Gentoo because it's more like the BSDs. Last month I tried to install FreeBSD on a well-sup...

StringTokenizer

The StringTokenizer is a weird class. It only tokenizes String s on a character or a set of characters, each of which individually forms the token delimiter. It doesn't actually tokenize based on a complete String . Using it in that manner can cause a lot of bugs!