Go: Why I ♥ Google

Christmas came early this year.

Glenda2Go

Today, Google announced their new open source systems programming language: Go. I’m super excited about this, we all have been wondering what Rob Pike has been upto since he joined the big G, and now we know. Not just that, but Ken Thomson, Robert Griesemer, Ian Taylor and Russ Cox were all involved in the project, with Ken doing what he does best, writing compilers in lightning speed ;) If that isn’t a list of heavyweight respectable computer scientists, I don’t know what is!

I think Go is poised to be the dominant systems programming language of the future. Go has nailed almost every aspect of a systems language, though some would say I’m biased. Go has been strongly influenced by Oberon, CSP languages like Limbo, and the standard libraries have tantalizing similarities to Plan 9. We’ve had Limbo and Plan 9 for a while now (more than a decade), but this is where my real love for Google begins to bubble, they took something awesome but unpopular and gave it a push to the masses. There are very few companies in the world who would attract the talent to do this, and even fewer who would open source the results. The attention Go has been getting is just mind blowing. Pike had been doing amazing work at Bell-Labs for quite a while, but none of it even got an inkling of the publicity Go is currently getting.

Google was what Pike needed to prove Utah2000 wrong.

I know one thing for sure, I’ll definitely be using my Plan 9 virtual machine a lot less; now that I can write clean concurrent programs that don’t make my head hurt, both in Linux and OS X. And GCC, I’m not shedding any tears while I bid you goodbye.

On another note, Google also announced today that they’ll be sponsoring free WiFi at a whole bunch of US airports this holiday season. For all its faults, Google definitely seems to be doing the right thing. For how long, it remains to be seen, but so far I’d say their track record has been better than excellent.

UPDATE: John Gruber points out that “judging from the copyright statements, [Go is] not an official Google project”. Could this be a result of the famous 20% time scheme?

Posted by Anant on November 11th, 2009 in FOSS, Google, Mozilla, People, Plan9, Programming, Technology | No Comments

GSoC Mentor Summit ‘09 Roundup

The grand Summer of Code Mentor Summit of 2009 concluded last week and I had the fantastic opportunity of being able to attend on behalf of Gentoo, Plan 9 and Mozilla. What follows is some indication of how awesome the summit was:

(Photo courtesy of warthog from Etherboot)

I met so many folks I’d only interacted with online so far (the classic nickname-to-face matching), but even better was the opportunity to meet folks powering open source projects from so many diverse backgrounds. I met many of my personal rockstars, and learned about a bunch of open source projects I’d never heard of :)

Also, one of the things that is only possible at an event like the summit was the ability to get a whole bunch of non-linux operating system groups in one room. We had a great discussion, and it resulted in the creation of the “rosetta-os” special interest group. Look for more activity on the common device drivers for non-linux operating systems front soon!

Other sessions worthy of special mention were Open Source Security, Recruiting and Retaining Awesome People, Advanced Trolling (yes, you read that right), and of course the always welcoming Casablanca where I spent most of my time. We discussed everything from our SoC experiences to the Afro Celt Sound System in that room, always full of creative energy and warmth.

After 4 years of participating in the Summer of Code, I am super happy to have finally met the faces behind the program. Every single person I met over the course of last weekend was friendly, intelligent and just generally awesome; that sort of thing doesn’t happen by chance. I feel warm and fuzzy inside to think that I’m actually a part of the revolution that is free and open source software, three cheers to everyone that made it possible!

Posted by Anant on November 1st, 2009 in FOSS, Fun, Gentoo, Google, Mozilla, People, Photos, Plan9, SoC | 1 Comment

The Summer of Code is here again!

It’s that time of the year. Google is, yet again, sponsoring students to write some awesome open source code this summer. If you’re a student, and you’d like to make some money contributing to some of the most well known and exciting open source software projects out there, you’d be missing out on a lot by not applying.

If you’re wondering about what the best way to get started is, check out this great advice page. All projects have also been tagged by programming language and field in this delicious profile. You can also search for ideas here.

I’m going to be mentoring for Mozilla, Glendix (under the Plan 9 Umbrella) and Gentoo this year. Get in touch if you’re interested in any of those ideas :)

The window for applications opens in a few hours. Good luck everyone!

Posted by Anant on March 23rd, 2009 in FOSS, Gentoo, Glendix, Google, Mozilla, Plan9, Programming, SoC, Technology | No Comments

FOSS.IN/08: Summary

As a developer, I have to say that FOSS.IN/08 is possibly the most productive conference I’ve been to until now! In just 5 days, I’ve got more things done than I have in the last 5 months :-)

Let’s start with the Beacon workout: Nandeep joined us via VoIP and we got started almost immediately, thanks to the dynamic nature and small size of our project – we didn’t have any infrastructural trouble as a few other C/C++ projects with huge codebases and complex build systems did. We had a list of 6 tasks in mind, and we managed to complete 3 of them. Salil Kothadia got started with writing a PDO data backend, and promptly submitted the patch to us next day. Thanks Salil, hope you continue to contribute to the development of Beacon (thereby increasing the development team size by 25%)!

I also attended Philip’s workout on porting HTML::Template to Javascript. As mentioned on the Wiki page, we mostly worked on the design during the first half or so, and then moved on to writing a skeleton for the whole framework. I think this is an extremely interesting project, and am very happy to be associated with its birth. Hope we can continue the momentum and work until it is finished.

Perhaps the biggest take-away from the conference for me was the ability to give a lightning talk about Glendix, with several kernel hackers present in the audience. Christoph then kindly offered to review some of the patches during the workout. Even the possibility of Plan 9 binary emulation being considered for inclusion into the main kernel tree is amazing, let alone the fact that I got the guidance of an experienced kernel hacker for a good 2 hours! I think the effort was largely successful – I now have a better idea of what I need to do in order to get a kernel patch in order, and also got a few hints as to how I can implement the missing bits.

My primary focus at the conference was to give a talk on Mozilla Labs and Innovation. I think I managed to stir up a decent amount of interest in the various Labs initiatives. I covered the different ways in which members of the community can contribute, specifically focussing on Weave, Ubiquity and the Concept Series. We even covered how easy it is to actually write an Ubiquity command. I now look forward to increased participation by the Indian Mozilla community in Labs projects. Don’t forget to thank Mary for all the goodies!

All this, apart from regular conference happenings like catching up with old friends, making new ones and free swag (great mugs and t-shirts this time around) makes FOSS.IN/08 one of the most successful conferences I’ve been to so far! I can’t wait for the 2009 edition :-D

Posted by Anant on November 30th, 2008 in Conferences, FOSS, FOSS.IN, Gentoo, Glendix, Hacks, Mozilla, People, Plan9, Programming | 2 Comments

Glendix on the Web!

Glendix has been making the rounds on the web lately, with coverage from OSNews, Reddit, and even a Russian site, Linux.org.ru. It’s really motivating to see some buzz around the project, giving me the extra boost needed to push the completion of a usable release!

Some of the major obstacles that have to be crossed before making a beta-quality release are the completion of critical synthetic filesystems – especially /net and /draw. We also have to work out the kinks with per-process namespaces and union mounts. I don’t know if we’ll be able to get Rio running as a WM before an official release; if not, Plan9Port’s Rio and WMII are good candidates.

The biggest criticism of Glendix seems to be the reasoning that Plan9 user-space tools are somehow superior to their GNU counterparts, and several people have asked us to substantiate our claims. At this point, however, I don’t think that it is really important, or even relevant. Even if Plan9 user-space tools aren’t somehow better – I think it is generally a refreshing idea to see Linux combined with a user-space other than GNU.

We’re at FOSS.IN this year, where a large number of kernel developers have gathered; and I hope to get some of their valuable input on the problems Glendix currently faces, and maybe even write some code to solve them :-)

Thanks for all the community support and critical comments, they are all very vital feedback for the project and are much appreciated!

Posted by Anant on November 27th, 2008 in Conferences, FOSS, FOSS.IN, Glendix, Linux, People, Plan9, Programming | 1 Comment

IWP9 2008

Continuing with my travel spree, I made a trip to Volos, Greece and back for the 3rd International workshop on Plan 9. I was to make short presentation on Glendix, a paper on which was selected for the workshop.

Being a brown single guy in his early twenties, traveling around Europe is not exactly fun. Just saying. I got picked out not once, not twice, but THREE times for “random passport and security checks”. Once in Munich on my way to Volos, once on the streets of Athens, and finally on my way back at the Frankfurt airport. Not that I’m complaning, they were just doing their job; but really, they need to get better at profiling.

Athens is a really nice city, though it reminds me of India: crowded trains, chaotic traffic and sketchy bus stations. I knew most of the Greek symbols, thanks to high school Math courses, but pronouncing them wasn’t easy. Thankfully, the people at the counters in the Airport, Bus and Metro stations knew English. After a 5 hour bus ride, I reached Volos in the wee hours of Thursday. After around 3 hours of sleep and about 30 minutes of slide preparation, I was set for my talk.

Considering I was at a Plan 9 conference, talking about integrating it into Linux, my talk was very well received. Certainly beyond my general expectations: I got some really excellent questions, comments and general observations, and most importantly, a lot of help on the current issues that Glendix faces. All the other talks during the conference were extremely interesting as well, I was particularly fascinated by the concept of “Upperware”, the Inferno port to Nindento DS, and the Mrph morphological analyzer. Do check out the entire conference proceedings.

It was great to finally meet all the Plan 9 and Bell Labs folks in-person, especially: Sape Mullender, Charles Forsyth, Bruce Ellis; not to mention the IRC regulars uriel, quintile, sqweek and fgb!

The return trip was a bit more scenic, thanks to it being afternoon. After spening the night in Athens, I was back in Amsterdam the next day. More adventures followed, but that’s for another blog post.

Nothing like a trip to IWP9 to humble you!

P.S. Cool Glenda goodies for sale at Cafepress :-)

Posted by Anant on November 3rd, 2008 in Conferences, FOSS, Glendix, Places, Plan9 | 2 Comments

Good times at 9fans

The 9fans list has produced TWO fortune-worthy quotes this weekend, a rather rare occurrence :)

If you cannot read this, reply. Otherwise, disregard. -Pietro Gagliardi

Come _on_. I’m not that subtle a “baiter,” or… am I? -Eris Discordia
you’re a master baiter. -Skip Tavakkolian

I must say the quality of traffic on the list has been detoriating even over the relatively small amount of time I’ve been subscribed to it.

Posted by Anant on October 14th, 2008 in FOSS, Fun, Humor, People, Plan9 | No Comments

Adventuring with a.out

The first step in the Glendix project was to write a binary loader for the Plan 9 a.out format. Linux has a clean interface for registering new binary format handlers from a module. Basically, you define a structure of type linux_binfmt and call register_binfmt during initialization of the module. Now all that’s left to do is implement the three functions that you pointed to in your structure: load_binary, load_shlib and core_dump.

Luckily for me, all Plan 9 executables are statically linked so I can just leave load_shlib as NULL. core_dump is also not that important during the development stages, although the final product must definitely implement it. To get a feel of what I needed to do in load_binary, I decided to take a peek into some of the other binary format handlers. I tried to comprehend the code for ELF with not much luck. I then turned to UTLK, which helped me understand what was going on. I highly recommend the book for anyone interested in kernel programming.

Anyway, here is when I found out that all ELF executables have sections that are actually page aligned! That means every ELF executable contains a bunch of zeroes after the TEXT section, so that the DATA section starts at the next page address. That’s how the executable is supposed to be laid out in memory, but I had no idea someone would actually think of doing it in the file. I guess they have their reasons, all the binary format loader does is mmap the file. Maybe for ELF2 they could put in zeros for the BSS section in the file too :p

Plan 9 executables on the other hand, are just normal files with no padding. This gives me a headache because I can no longer use mmap. Recall that all addressees passed to mmap have to be page-aligned. But the DATA section in Plan 9’s a.out will start at a non-page-aligned address most of the time.

One of the first things I tried to do was to mmap the file into a high address, copy portions into the appropriate locations and then free the mapping. That didn’t work so well because:

  • memcpy works only on physical addresses. Logical addresses from the virtual process address space can’t be easily translated to physical ones because Linux delays physical memory allocation for as long as possible. Now we know why all the loaders use mmap, it is fundamental to the “Linux way” of memory management.
  • There is no generic copy_in_user implementation. There are specific ones that use assembly code for PPC, SPARC and even x86_64, but none for x86. The alternative was to use copy_from_user to move data into kernel addresses and then bring them back using copy_to_user. That didn’t work out well either – copy_to_user kept failing for some reason.

I ended up writing a userspace program called ‘pad’ that page-aligns a Plan 9 a.out executable. The loader just mmap’s the file, like all other loaders. The solution is suboptimal, if someone knows a clean way of doing all of this in kernel-space, I’ll be grateful for the help. The ultimate goal is to run Plan 9 executables on Linux, unmodified.

The code for the loader and the pad program can be found on git here.

Posted by Anant on February 29th, 2008 in Books, FOSS, Glendix, Hacks, Linux, Plan9, Programming | No Comments

Back from Goa

My Goa trip was simply fantabulous. Apart from the fact that Goa is a great place for a vacation, I was accompanied by 7 of my college friends which made the trip one that I will cherish for a long time to come.We left Bangalore by bus on the 15th. The journey was pleasant and the view next morning was absolutely stunning:

The bus dropped us off at the Panaji bus terminus, and we took a shuttle from there to Vasco – where Ameya (our host) lived. After a nice lunch and a nap, we took off to the beach closest to base camp – Bogmalo. The beach was a quiet and clean with relatively few people around, which made it possible for us to play a game of beach football. We returned home after jumping around in a sea for a while.

We hired a couple of Activa’s the next day (this seems to be the norm for transportation in Goa) and reached Old Goa in an hour or so. We visited the really old church, which was really impressive – it also contained the remains of St. Francis Xavier. The archaeological museum next door was fun too, very informative about the history of Goa. We proceeded to the capital city of Panaji next, and after booking tickets for a river cruise aboard the Princess de Goa for the night, had lunch at the QuarterDeck.

After lunch, we visited Donapaula, a popular Jetty, which was unfortunately under renovation or something. The view was great though, and we enjoyed a nice little ride on the water scooter. After hanging out in Cafe Coffee Day for a while (These places are *everywhere*, I think they’re trying to become the Indian Starbucks :)) we reached the Panaji river coast to board the Princess de Goa. These river cruises seem to be a popular attraction, they basically consist of a few dance shows, a dance floor and an amazing view. We got to see the (in?)famous floating casino on the way too.

My Summer of Code mentor, Matt Lawless, happened to be in Goa too, so we scheduled lunch for the next day. We met at the Calangute post office (which was somewhat close to Matt’s home) and proceeded to the Calangute beach after lunch. My friends, meanwhile, reached the Baga beach, which was just next door to the Calangute beach (the two most famous beaches in Goa). We splashed around in the water for a while, joined by Matt, and then a second lunch :)

Matt decided to leave, and we went on to try some of the water sports at the beach. We went for a banana ride, a water scooter trip, but the one that took the cake was the parasailing. Nothing like a gentle ride in the sky to rejuvenate you. Flying over water with the beach behind you and the sunset in front is an experience I can’t put in words :)

The third and last day began with a long ride to south Goa, where we first visited the Benauli beach. This beach was beautiful, the sand was different than the others, and the most fun part was when I was buried by the others:

The rest of the day was spent at GoaKart, which was apparently a national Karting track. Parasailing was great, but karting was really the most exhilarating, especially because we raced and went for 4 rounds :D

Flickr didn’t let me upload more than 100MB of photos at once, so I moved to Picasa Web Albums instead. I wrote a small script: backr.py that uses James Clarke’s flickr.py to back up all my photos and uploaded them to Picasa Web, which allows me to create as many albums as I want (unlike Flickr). UPDATE: I finally got myself a Flickr Pro account, so pictures are back there again. This time I just used iPhoto to migrate :)

So, I guess that’s a few more items off my “list of things to do before I die”!

Posted by Anant on December 23rd, 2007 in College, Fun, Google, Hacks, Life, People, Photos, Places, Plan9, Python, SoC | 2 Comments

FOSS.IN: Day 3

Day 3: The first day of the main conference. We thought we were running late (left home only at 09:50 after getting our Gentoo T-Shirts on) but the inauguration ceremony started half-hour late (as usual!) so we were able to catch the whole action. After FOSS.IN/2007 was kicked off by Atul & Kishore, Naba Kumar came up to give the keynote on Anjuta DevStudio. I didn’t know the origin of the name Anjuta earlier, but it was certainly fascinating :)

I had my talk on contributing to Gentoo right after the keynote, and we started at 11:30 on the dot (the schedules in other rooms were on-time). Gora gave an excellent introduction, and I began speaking to a somewhat-filled room about the different entry points to Gentoo development. The audience were really interactive and the questions were brilliant – this is something that I really liked about this years edition of FOSS.IN. There was a lot more interest in Gentoo than I had originally anticipated and it was nice to see our stall really crowded immediately after the talk. Hopefully, we’ve brain-washed atleast two-dozen people into using Gentoo :). The remainder of the day was spent talking to people who approached our stall – it got a bit monotonous though, answering the same question “Why is Gentoo different?” over and over again. We’ve decided to print out an FAQ poster and put it up to make things a little more easier for us ;)

I had my third talk on Plan 9 from Bell Labs scheduled in the evening, right beside some really interesting stuff including the talk on PulseAudio and the lightning talk session. Again, I really didn’t expect much of a crowd for my talk, but I was happily mistaken. The room was not only full, but there were also people seated on the stairs and near the door! The talk went off really well, and I think it was *the* best talk I’ve delivered so far. The crowd was really smart and it was fun to interact with such an audience.We’ve planned to have a small Mozilla hack-a-thon today, let’s see how that goes. Besides that I’ve planned to attend a few other interesting talks. Looking forward to keeping the pace up, I’ll catch you all tomorrow!

Posted by Anant on December 7th, 2007 in Conferences, FOSS, FOSS.IN, Gentoo, Mozilla, People, Plan9 | No Comments