The cake is a lie

Archive for the 'Linux' Category

Gentoo, Rockband, Code, and Music

Today, you’ll get to hear about what I’ve been up to! This wont be on the exam.

  • After a year and a half stint with Ubuntu, I’m back to my true love Gentoo. That is, with a shiny matte new quad core beast of a machine.
  • Bought Rockband for my PS3 couple of weeks ago. Drums are ridiculously hard. Been rocking out. Good fun is being had by all those who dare rock. Can’t wait for Still Alive to be released for free. It shall be a triumph!
  • What started out as pretty code is now a bonafide open source Python module: workerpool. People are using it. No, really.
  • muxtape.com: A super simple music sharing web app launched last week. Its been enriching my life — doing what Pandora once did. Here’s my muxtape. Be right back, there’s someone at the door.
5 comments

Installing Gentoo on Playstation 3

Mario!

  1. Back up my precious save files: Formatted my external hard drive to FAT32, plugged it into the PS3, went to System Settings > Backup Utility, and hit OK.

    While it’s backing up, I’m reading various Playstation 3 hacking forums, such as ps2dev.org where the first hack to utilize the locked-away GPU in Linux was created. Apparently there’s also hope to use the Playstation Eye as a webcam

  2. Burned the installcd ISO, inserted it into my PS3, hit Install other OS, it did its magic, rebooted, and I was in the Gentoo install CD. Just like that.
  3. Plugged in a keyboard into the PS3, created a password, started sshd, and ssh’d in from my desktop and did the rest from the comfort of my fancy chair.
  4. Followed the Gentoo Install guide which took about 20 minutes of work, the rest was waiting for things to download, extract, and compile. Meanwhile, I ate pizza and watched the first couple of episodes of Jericho through my PC. Not too bad.
  5. Time for the real purpose of this ordeal: Setting up emulators. After much trial and error, I learned that Mednafen is the cream of the crop. After more jumping through hoops, I created the perfect controller configuration that supports two PS3 Sixaxis controllers plugged in USB (bluetooth works too!). You can download it here: mednafen.cfg. Shove it in your ~/.mednafen/ and you’ll be good to go — full screen and all.

    To make your own key bindings, read the nitty gritty in this thread.

PS3 Mario

10 comments

Linux Love, part 2

(Continuation of Why I Love Linux)

  1. Need to make a quick ISO image of your CD or DVD?
    dd if=/dev/cdrom of=/tmp/output.iso
  2. Your minion co-worker is leaving the office for an alleged 5 minutes, you believe David he is a liar and need to prove him wrong? time read in your nearest terminal, then hit ctrl+d whenever he’s back, and tada, instant stopwatch.
  3. Need to SSH but don’t feel like using ol’ cd and ls? Fire up KDE’s fish:// protocol and SSHing is the same as browsing your local files. Even edit things in-place.
  4. You’re doing something long and CPU-intensive in a terminal but you feel like playing a game that needs said CPU? ctrl+z to pause the process, do your thing, then fg to resume.
  5. Need to make a quick backup of something and too lazy to type it twice? cp foo{,.bak} is equivalent to cp foo foo.bak. Great for those /super/long_paths/that\ everyone.dreads.
  6. Bonus Super-Useful Alias: alias p='ps aux | grep -i'. Need to check if your rogue daemon process is still alive? p foo

Much of this was written about a year ago and I never got around to posting it. Yay for agelessness of Linux.

No comments

Filesystems and murder

Hans Reiser created the Reiser4 filesystem which is widely regarded as the best
performing and most extensible modern filesystem. After stumbling upon href="http://video.google.ca/videoplay?docid=6866770590245111825&q=hans+Reiser">
Hans’ Tech Talk at Google, I was intrigued and
went off to read more about it. You can find plenty of information within the
various links in this post, so I’ll only go over what I personally found
interesting about Hans and his filesystem in approximately chronological
order:

  • Hans Reiser was born
    in California, dropped out of junior high school because he
    didn’t like the way things were taught, and got accepted into UC Berkeley at the
    age of 15. He earned a degree in Systematizing (combination of Math,
    Physics, etc).
  • Worked in
    various tech jobs
    to accumulate capital. Hired a small team of programmers
    from Russia (to avoid venture capital) and founded href="http://namesys.com/">Namesys which is responsible for developing the
    Reiser filesystem.
  • ReiserFS (aka. Reiser3)
    was created from scratch by Hans Reiser. Made it into Linux Kernel at version
    2.4.1. Hans was dissatisfied with the performance in some key situations (many
    small randomly-sized files), so once ReiserFS was stable, he went on to create
    Reiser4.
  • This would be a good time to read the href="http://newkerneltrap.osuosl.org/node/5654">interview with Hans Reiser on
    KernelTrap. In particular, the Background section where he talks
    about the thought process and attitude of being a systems architect, which I
    found very insightful. Some of the following points summarize the interview.
  • What happened to Reiser1 and Reiser2? Due to a versioning mistake early on,
    the major version number got bumped up to Reiser3, and they refused to go back.
  • Hans invented an improved data structure for Reiser4 called the href="http://en.wikipedia.org/wiki/Dancing_tree">Dancing Tree. This tree
    structure has better performance than most modern databases (which use
    variations of B trees). This has something to do with the tree structure being
    more parallel to the way a hard drive stores and reads data.
  • Reiser4 code is incredibly modular, clean and well-documented. It boasts an
    impressive plugin architecture which supports significant expandability, like
    live compression, encryption, metadata, querying, etc. Also, Hans is very
    supportive of the open source development mantra and very encouraging of
    external contributions.
  • Through plugins, Reiser4 is able to match all the functionality that
    Microsoft promised with WinFS
    and more.
  • One example of an impressive plugin is live compression: Due to advancement
    in CPUs, we are able to compress data faster than hard drives can write it, so
    we can compress things on the fly without performance penalty. In fact, we gain
    performance due to the decreased amount of data needed to write or read. More
    compression = less space = less blocks to read/write = faster operations. With
    average compression rate of 50%, we’d be able to achieve x2 read speeds (as
    well as 1/2 storage space required).
  • Reiser4’s storage is completely independent of the overlying structure (like
    the hierarchical structure that we’re used to). With plugins, Reiser4 can be
    extended to function like a relational database or any other metaphor we can
    produce.
  • Reiser4 is not yet part of the main Linux Kernel branch (but is available
    through Andrew Morton’s patchset). Next step is to get it stable enough to make
    it into the kernel and then start pumping out those awesome plugins.
  • Nancy Reiser, Hans’ wife, disappeared on September 6th, 2006. href="http://news.google.com/news?q=hans+reiser">Hans was accused
    of murdering her. Blood splatter was found. On October 16th, Hans was
    arrested. Body still missing. Alternate speculations include that she ran off to
    Russia (her place of birth). Great concern for the development of Reiser4
    ensues.

It may seem selfish and barbaric to be concerned about the health of the
development of a filesystem when a woman is murdered, but href="http://www.ninareiser.com/">many people do show compassion.
Similarly, many people believe that Reiser4 is the filesystem,
and with the leaps of advancement it has over competing filesystems, these
people fear for the project’s future. Slashdot discussion covered this topic on
several occasions.

My best wishes go out to Nancy Reiser and the Reiser4 project. May they both
turn out to be alive and healthy.

No comments

Linux Kernel 2.6.18 Changelog Statistics

My ultra controversial rant about women in computer science is enduring writer’s block, so I’ll present some interesting statistics I found in the latest Linux Kernel 2.6.8 Changelog (3MB, be warned):

  • Total Patches:
    $ grep -i "Author: " ChangeLog-2.6.18 | wc -l
    6325
  • Number of unique contributors
    $ grep -i "Author: " ChangeLog-2.6.18 | sort | uniq | wc -l
    938
  • Number of patches by Andrew Morton (lead maintainer)
    $ grep -i "Author: Andrew Morton" ChangeLog-2.6.18 | wc -l
    133
  • Number of patches by Linus Torvalds (father of Linux)
    $ grep -i "Author: Linus Torvalds" ChangeLog-2.6.18 | wc -l
    40
  • Number of patches by people with IBM email addresses
    $ grep -i "Author: .*@.*ibm.*\.com" ChangeLog-2.6.18 | wc -l
    387
  • Number of unique IBM contributors
    $ grep -i "Author: .*@.*ibm.*\.com" ChangeLog-2.6.18 | sort | uniq | wc -l
    81
  • Number of patches by people with Google email addresses
    $ grep -i "Author: .*@google.com" ChangeLog-2.6.18 | wc -l
    11
  • Number of unique Google contributors
    $ grep -i "Author: .*@.*google.com" ChangeLog-2.6.18 | sort | uniq | wc -l
    7
  • Number of patches by people with GMail email addresses
    $ grep -i "Author: .*@gmail.com" ChangeLog-2.6.18 | wc -l
    466

Take these numbers with grains of salt. Some people use multiple email addresses, others use non-work email addesses — Andrew Morton is a Google employee for instance, but doesn’t use a @google.com address.

I was impressed at the quantity of contributions by IBM, they make up 6.1% of the total number of patches in this release. Good work!

2 comments

Nothing is free

While reviewing the latest hubbub on GPLv3 (the open source license) I got hit with a strong wiff of nostalgia. Back in my Windows days, some 9-10 years ago — before I discovered the dark art of pirating software, I would browse download.com for freeware. My perception of freeware was that a very kind-hearted developer, surrounded by a throng of money-hungry leeches, stood up and exclaimed “I’m going to try make the world a better place.” On Windows, freeware was so rare, I’d be lucky to find anything at all that was worth using, but occasionally I did (like IrfanView, one of the best image viewers I’ve ever used).

Fast-forward to today, into Linux-land, where 99% (literally) of my software is open source and free. The 1% being Cedega (used for running, non-free, Windows games).

While reading the debate on GPLv3, I see that there really is a throng of kind-hearted developers amidst the throng of money-hungry leeches. Albeit a smaller throng, but a throng nonetheless. Enough people to make the free world turn.

Some things are free.

2 comments

Why I love Linux

As a casual gamer, I game. I game with Cedega and I game with Wine. Occasionally, I’ll also enjoy a native game or two.

While enjoying an exuberant game of WarCraft III, I will occasionally have some downtime and use it to check my messages. This requires switching from the game to another application. In the ol’ Windows days, this would be done with an alt+tab. You’d hit the two magic keys, blink your eyes and hope that the screen changed states by the time your eyes opened. Of course, it never would. You’d always open your eyes with disappointment, and wait a couple more seconds until Windows woke up and decided to do something useful.

Although Linux is faster with the window switching to begin with, desktop switching is in a league of its own. When I was a young and unwise penguin, I scoffed at and avoided virtual desktops. Also, in the same streak of naivety, I always used to maximize my windows — but that’s a different rant altogether. But now, by allocating different purpose to each virtual desktop, my productivity flourishes. And I can save a few precious eye blinks — dry eyes be damned!

One for web browsing and chat, one for music and file browsing, one for development or gaming, and one to bind them all.

When I play some WarCraft III DOTA on desktop #3 and I get pinched to death by the Sand King, I can spend the 40 seconds it takes to respawn productively by replying to pending messages on desktop #1. And quickly switch to desktop #2 to change songs before going back into battle.

There was a slight issue of Gaim opening its new message windows in whatever desktop was currently active, but that’s easily fixed with awesome desktop managers like KDE by restricting the application’s window class to a specific desktop. Yay.

10 comments

The initiation


Elder brother helping younger brother install Linux

(Elder laptop brother helping younger brother install Linux)

Isn’t it cute? Adorable! They’re getting along great. The youngin’ is a total attention whore though.

Read more

No comments