My first kernel patch

2011-10-31 22:47:13 PST

Tags: , ,

About 3 weeks ago Lennart Poettering posted A Plumber’s Wish List for Linux to his blog, which is one of the many Linux related blogs I read. Included on that list was a request to “expose CAP_LAST_CAP somehow in the running kernel at runtime”.

Now I’d never contributed to the Linux kernel before, but in college we had hacked on the Minix kernel to extend it and in University we had written our own kernel and implemented virtual memory, task switching, message passing and preemptive processes; so I was at least familiar and comfortable with kernel level development. Looking at this task, I immediately thought, “hey, that is totally within my capabilities and I can probably squeeze it into my schedule”.

So I did. I checked out the latest copy of the torvalds Linux repository and implemented the feature. The actual implementation didn’t take too long. Mostly looking for the right place. What did take a day or two was getting up to speed on Linux coding practices and patch submission protocol and procedure. They have a good process in place and it’s best not to step on toes so I did my research as best I could. When I was ready I sent in my patch.

Andrew Morton picked it up, asked for a few enhancements, and those submitted, added it to his -mm tree for testing. Then a few weeks later Linux 3.1 launched and the new merge window opened and today Andrew submitted his diff from the -mm branch including my patch to Linus and it was merged to his tree!

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=73efc0394e148d0e15583e13712637831f926720

I am now a Linux kernel contributor. I have a small piece of code in the Linux kernel that will ship with 3.2. It’s not huge, but I did it, and that gives me a real sense of pleasure and accomplishment. Thanks to all who helped!

On the go

2010-01-07 21:04:41 PST

Tags: , , , , , , , , ,

So, what have I got on the go?

  • School: Last semester, just two classes, but they are looking like they’ll be delicious and meaty
    • CS 411: Compiler design: We build a java compiler
    • CS 415: We build an operating system, fun times with C!
    • …actually, I’m also taking spanish!
  • “Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp” by Peter Norvig. I got this for christmas and have started to work through it. I’m really excited about getting further into it. In the middle of it I’ll be implementing prolog in Lisp and the in the latter half I’ll be working on a natural language processor! Not to mention tons of other stuff, this book is huge and dense.
  • BattleCode 2010 has just started so my team and I are just about to start digging into that. Lots of AI coding to be done there.
  • Peter Michaux’s Scheme from Scratch. I stumbled upon this from Hacker News. This fellow wants to write his own scheme to scratch a mental itch, and he’s blogging each step and posting the code as well. I think it looks like a great amount of fun and that I too have that mental itch, so I’m following along, using his blog as a guide and looking at his code as well when I get stuck, but doing my best to do it myself.
  • The great mindstab.net migration to the cloud! Yes, setting up an entirely new server and migrating years of site history and email etc can take a lot of work.

So yeah, I have an insane amount of work on my plate, but I couldn’t be more excited! All of it is thrilling and amazing!

Also, if I haven’t mentioned it before, the dynamic duo of Jono Bacon and Stuart Langridge of Lug Radio fame are back with a new podcast Shot of Jaq! It’s fun. Really, those two Brits have been the source of the only podcast’s I’ve ever listened to. They are a great source of both Linux and British in my weekly diet.

But now I’m stoked to just find out that Ximian/Linux rockstar coder Nat Friedman and Tomboy creator and a rock star in his own right Alex Graveley have started a brand new podcast Hacker Medley that is the first new podcast that I’m actually quite excited to try out.

Finally, I’m reading “Pattern Recognition” by William Gibson in my spare time (read: on the bus) and finding it pleasant.

Mindstab Go AI competition status report

2008-06-22 11:02:17 PST

Tags: , , , ,

Well the Mindstab Go AI competition is really starting to heat up. You can watch the battles unfold over on the match page.

So far the only entered contenders are myself with “fink” and Rob with “RGB”. He took an early lead for a while and was working towards beating our house bot, “Amigo” (found on the net, an old Go bot from the early 90s, was originally an Amiga gobot that was someone’s PhD dissertation. It isn’t super good, but it is fast), and making progress on that. I finally got some free time and have been working a ton in the last week and on friday got my bot up to a point where it could beat his, and thus took the lead. Now with some actual competition the two of use are both hacking away at a good pace and he’s retaken the lead for now but neither of use can quite best Amigo yet.

I’m also pretty happy with myself as my entry is coded entirely in Lisp, and this is my first actual Lisp project. So things are sailing smoothly enough, and I’m also learning tons about Lisp. Also, I’m crediting the high level power of Lisp with letting me do more interesting things easily, which I’m going to attribute to the fact that my bot runs at usually 1/3 to 1/2 the time Rob’s does, even when beating it, and his is written in C. So when it comes to thinking about optimizing, it seems algorithms are a lot more important than the speed of the language implementing it, and a language that lets you more easily use more complex algorithms is possibly better. We’ll see though once everything is all said and done .

We’re hoping a few of the other people who have expressed interest will soon get enough code together to join the competition, and we’re always looking for more interested people. The more the merrier!

Re: A Timeless, Desert Island Language

2008-06-04 21:01:56 PST

Tags: , , ,

You know, dear internet, I’m very impressionable some times. Anyways, I was leafing through my feeds when I found this neat blog post by fellow name Dave Roberts, entitled A Timeless, Desert Island Language in my Planet Lisp section. And it’s a quick neat fun read, with a conclusion you might not expect.

And if you read it, you’ll probably be able to predict what shinny new idea/project has caught my attention, especially if you were already familiar with my kink for computer languages.

I want to find some time to take a quick stab at writing a simple Lisp interpreter!

Note for C developers on Ubuntu

2008-05-09 11:57:13 PST

Tags: , ,

Right, so when doing C development on Ubuntu I suddenly noticed something was missing in the pan pages department. Like all the C api.

apt-get install manpages-dev

ah that’s better. Someone might want to make it part of the ‘build-essentials’ package.

C++ is getting Lambda expressions! (and Cadbury creme egg cakes)

2008-03-31 00:28:00 PST

Tags: , , ,

C++0x, the next version of C++ due by the end of the decade has just had Lambda expressions added to the language. This is great!
Read about it at herbsutter.spaces.live.com/blog/cns.
It should look something like the following

find_if( w.begin(), w.end(),
             []( const Widget& w ) -> bool { w.Weight() > 100; } );

Sadly, Lambda expressions haven’t made their way into GCC, so I can’t play with them… yet!

Also, thanks to George for this:

Cadbury Egg Cake :D

Experiment:

Replace ordinary eggs in cake recipe with Cadbury Creme Eggs and observe results.

Hypothesis:

THIS IS GOING TO BE SO AWESOME

bigmixup.com/content/cadbury-cake

Valid XHTML 1.0!
Valid CSS!
Mindstab.net is proudly powered by WordPress
Entries (RSS) and Comments (RSS).
20 queries. 0.367 seconds.