I've been trying to figure out how delimited continuations in Scala work, from a users' perspective, although pretty much all the examples have been written by people who have been working for ages with functional languages. For example, this is the description from wikipedia on delimited continuations:

In programming languages, a delimited continuation, composable continuation or partial continuation, is a "slice" of a continuation frame that has been reified into a function. Unlike regular continuations, delimited continuations return a value, and thus may be reused and composed.

I'm sure it makes sense to someone well versed in functional programming, but to someone coming from a pure, nonfunctional background, it makes no sense at all.

Dot.Physics on Wired recently ran a blog post about How Much Ice Do You Need For Your Drinks? which attempts to determine the amount of ice needed to cool n beers. Unfortunately for Rhett Allain, he might have had a bit too many beers as his conclusion is incorrect; the first hint at what's going wrong lies in his statement that "If you proceed with this equation, you will find that the final drink temperature will be colder than the initial ice (for significantly large amounts of starting ice)."

When developing on several platforms, environments and languages, one eventually ends having several SDKs that need to be added to the PATH environment variable. An easy way of doing so is to scan a certain directory when starting the shell, so that all subfolders containing a bin directory are automatically added to the PATH. This is what I have in my bash profile:

# Where SDKs are installed
SDKS_ROOT="$HOME/SDKs"
# Add any SDKs present to the path
if [ -d $SDKS_ROOT ]; then
	for SDKNAME in `ls $SDKS_ROOT/`
	do
		SDKPATH="$SDKS_ROOT/$SDKNAME"
		if [ -d "$SDKPATH" ]; then
			export PATH=$PATH:$SDKPATH
			if [ -d $SDKPATH/bin ]; then
				export PATH=$PATH:$SDKPATH/bin
			fi
			if [ -d $SDKPATH/tools ]; then
				export PATH=$PATH:$SDKPATH/tools
			fi
			if [ -d $SDKPATH/platform-tools ]; then
				export PATH=$PATH:$SDKPATH/platform-tools
			fi
			if [ -d $SDKPATH/tools/bin ]; then
				export PATH=$PATH:$SDKPATH/tools/bin
			fi
		fi
	done
fi

This means that upon starting the shell, all subfolders of ~/SDKs are treated as an individual SDK. Installing an SDK is just a matter of adding a folder there, so that whenever the play framework, scala, app engine or some other relatively fast moving target releases a new version, upgrading is just a matter of deleting the old SDK and dropping in the new version. Cool, eh?

IEEE Spectrum wrote that Silicon Is Key to Quest for $5 LED Lightbulb, in which they explain that by changing the substrate on which GaN LEDs are made to a much cheaper one, they are going to be able to slash costs.

He [Bridgelux's VP of marketing] claims that this outsourcing will cut chip-manufacturing costs by 75 percent and, combined with steady improvements in manufacturing, lead to a $5 LED bulb as soon as 2014.

Considering the only thing holding back LED lighting currently is the prohibitive cost compared to CCFLs --- the article mentions a price of over 40$ per 40W lightbulb --- and that LED lighting is superior in many aspects to CCFLs, I am looking forwards to such price slashes.

In this world, nothing is certain but death, taxes and bug reports from users. While we may not be able to do much about the first two, to address the third one effectively more information is required. The most important information you can have is, of course, the version of the code they are running. However, if your users are running the latest bleeding edge version of the code, odds are that the version number that they will have is "1.0-SNAPSHOT". That's not terribly helpful, so here's how to add the Mercurial revision --- I assume the same works for git and SVN --- to your project and read it from your code.

I was about to file my taxes for 2010 when I noticed in my mailbox that I received form 1042-S (Foreign Person's U.S. Source Income Subject to Withholding) for some dividends paid by a US corporation. As I wasted a couple of hours trying to figure if I needed to file in the US or not, I figured I'd save some time for other people by writing about this.

The New York Times has an interesting visualization that shows a possible path for the radioactive plume emanating from the Fukushima Daiichi. Unfortunately, there are a couple of data visualization errors that make the chart seem worse than it seems.

nyt-datavis.png

We'll see how long this lasts.

fessebouc.png

Over the last decade, the US debt has soared to levels that have not been seen for over 50 years. While this phenomenon is not constrained to the US — John Lipsky of the IMF said that they expect that all G7 countries except Canada and Germany will have debt-to-GDP ratios close to or exceeding 100 percent by 2014 — it is still preoccupying to see our neighbors to the South get into debt so quickly.

For one of the projects I am working on, I needed to interact with some native code via JNI which has a strong probability of crashing. As a native code crash causes the entire JVM to abruptly cease working, I wanted to launch a child JVM to isolate my code from native crashes. Unfortunately, there is no such function in Java to do so, but by adding the ant jars to the classpath, it is possible to use the built-in ant functions to launch another JVM.