citizen428.blog()

Try to learn something about everything

Information Overload 2011-10-30

The individual has become more conscious than ever of his dependence upon society. But he does not experience this dependence as a positive asset, as an organic tie, as a protective force, but rather as a threat to his natural rights, or even to his economic existence.

Sometimes the hardest thing about committing the perfect crime can be keeping your genius to yourself.

Fun With Twitter and MongoDB

I’m currently reading the early access version of MongoDB in Action, so I felt like playing around with it a bit (in fact I do use it for Happynerds.net, but that’s not very exciting). I then remembered that I recently stumbled upon a service called The Exporter, which I had used to download all my tweets from Twitter (as of October 4th 2011). So why not use MongoDB to find out which users I retweet most often?

Tom and Michael vs. John Von Neumann

In case you wonder if Tom and I gave up on reading papers, the answer is a resounding no! In fact there’s one we finished sometime around mid-September, which for various reasons hasn’t been summarized yet. This is about to change.

The paper

The paper in questions was “Can Programming Be Liberated from the von Neumann Style?”, a Turing Award lecture by John Backus.

A very brief summary

At the core of his lecture, Backus argues in favor of functional/applicative programming. This is done by first exploring shortcomings and bottlenecks in the von Neumann architecture, followed by an exploration of concepts from his own FP) (Function Programming) language.

Difficulty of the paper

Generally this is very easy to read, and provides good food for thought, even today. The more mathematical parts in the middle might deter some readers, but aren’t really that important.

Takeaway

Alas the age of the paper shows a bit. While some of the points are still valid, there undoubtedly is a much wider appreciation of the benefits of applicative style programming nowadays, as can be seen by various functional languages slowly finding their way into the mainstream. It’s still very interesting to see how early Backus already thought about all of this though, and also that the language he envisioned seemed to be more in line with the APL school of thought that e.g. Haskell, which in all fairness wasn’t around back then. I wonder how Backus felt about the latter, which can be very declarative (see pointfree style). For example, here is the inner product function from section 5 of the paper translated to Haskell:

1
2
ip :: [[Integer]] -> Integer
ip = sum . map product . transpose

If you like programming languages and also like to think about them, and learn about their history, this is an interesting paper to read. Also it’s quite ironic that Backus actually won in large parts for his contributions to Fortran, a language that influenced so many other imperative languages.

Information Overload 2011-10-23

The Internet is a radical medium: it mostly reflects polarized positions.

Interestingly, this desire for distinctiveness could be quelled by giving the aroused males a candy bar.

A Chrome Extension for Soup.io

On October 29th the local Google Technology User Group is hosting a Chrome Hackathon, in which I’ll participate. As a little warm up exercise I created a small extension for my favorite microblogging service Soup.io, which basically just wraps their bookmarklet.

All in all this was a very nice experience, since the developer’s guide is thorough and well written. After reading the “Getting Started” tutorial, almost all my questions were already answered. The others — which were generally caused by my poor JavaScript skills — could easily be solved by consulting Google and StackOverflow.

Fixing Grub on a LUKS-encrypted Disk

When I rebooted my new work notebook (a very nice x201s, with a dual-core i7, 8GB RAM and an SSD by the way), it seemed that for whatever reason there was no Grub installed. Strange, but not the only problem I had with the alternate Ubuntu installer that I used for setting up LUKS-encrypted root and swap partitions. Since this turned out to be more involved than I originally thought, I decided to document what I did to maybe save others the trouble. BTW: You’ll need a Linux Live-CD for this, I recommend the excellent Debian-based Grml.

First we need to open the LUKS partition, which can be done with cryptsetup.

Step 1: Unlock LUKS
1
2
$ cryptsetup luksOpen /dev/<device> <name>
# you'll be asked for your password

With that out of the way, you’ll have to mount your LVM volumes. This took me a bit because my VG wasn’t active, but thanks to an excellent blog post I found (see sources) this problem was solved quickly.

Step 2: Mounting LVM
1
2
3
4
5
6
7
8
# do a lvm disk scan
$ lvmdiskscan
# activate the volume group
$ vgchange -ay
# make sure the VG is active now
$ lvscan
# mount the actual volume
$ mount /dev/<volume_group_name>/<volume> /mnt/external

I then needed to mount the unencrypted /boot partition as well as some special filesystems (with bind mounts) at the appropriate mount points.

Step 3: Preparing for the chroot
1
2
3
4
5
6
# mount the boot partion
$ mount /dev/<device> /mnt/external/boot
# bind mount some things we need in the chroot env
$ mount --bind /dev /mnt/external/dev
$ mount --bind /proc /mnt/external/proc
$ mount --bind /sys /mnt/external/sys

With everything set up, all that’s left to do is chrooting into the system and fixing Grub.

Step 4: chrooting and fixing Grub
1
2
$ chroot /mnt/external
chroot$  grub-setup # grub-install, whatever you need

Sources:

Information Overload 2011-10-16

Above all, remember the more harm you cause, the more hate you feel, and the more kindness you deal into the world the more you come to love the people you help.

If he went to see a basketball game, he’d walk out taller.

Octopress Customizations

I finally found some time to give this blog a less generic look, which was really easy thanks to Octopress’s great theme and customization support.

First I changed some colors in sass/custom/_colors.scss:

1
2
3
4
5
$header-bg: #000;
$subtitle-color: lighten($header-bg, 58);
$nav-bg: desaturate(lighten(#FF7100, 18), 5)
$link-color: #FF7100;
$footer-bg: #CCC;

Then I reduced the width of the body, the size of the dates and article titles as well as the codeblocks (all of this can be done in sass/custom/_styles.scss):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
body {
  max-width: 1100px;
}
time {
  font-size: 14px;
}
h1 {
  font-size: 2.2em;
}
section {
  > h1 {
    font-size: 1.5em;
  }
}
codeblock {
    font-size: 1.1em;
}

Last but not least I found some excellent free social media icons for the sidebar.

I hope you like the changes, I do and I was also pleasantly surprised how easy it is to change the look of an Octopress blog.

Information Overload 2011-10-09

Thus, tweeting "Down with capitalism" from your iPhone for those around the world to read seems to be the most ironic thing a person can do.

If only we carried rocks instead of cameras, we’d look like revolutionaries.

Awesome Indie Games

I used to be a big gamer, especially when it came to console games. Nowadays I don’t have much time for that anymore, but I’m still quite interested in gaming culture and games as a medium. I’m especially fond of indie games, since their authors can afford to explore stranger concepts than more mainstream development teams. Here’s a list of some of my favorites, most (all?) of which should be available on Windows, Mac and Linux:

  • And Yet It Moves: Awesome physics-based platformer, featuring a very unique design.
  • Atom Zombie Smasher: Probably my absolute favorite at the moment. Great presentation, awesome music and an interesting twist on the tower defense genre.
  • Braid: Cute puzzle game that utilizes time as a central element of the game mechanics.
  • Crayon Physics Delux: Ok, I’m a sucker for physics based games, and this is no exception. The great visual style definitely helps.
  • Desktop Dungeons: While the developers are working on a “proper” version now, the original alpha is still available for free. Think of it as the bare essence of rogue-likes.
  • Osmos: I really like this one for it’s almost meditative quality.
  • Sword of Fargoal Legend: Another dungeon crawler that proves that good game mechanics are more important than fancy graphics.
  • Trauma: Maybe the most unique game in this list, this point and click adventure deals with the psychological trauma of a young woman who survived a car crash. Eerie atmosphere, great presentation.
  • VVVVVV: A 2d puzzle platformer that I’m quite fond of. Messing with gravity while listening to chiptune music? Count me in!
  • World of Goo: The cute Gooballs alone are a reason to play this one.