FOSS.in/2009 Day 4: cd
trek and hack
[info]siddhesh

The last day of FOSS.in. Kartik wakes me up saying "You have to pack, get up". I got up, went across the hall and rang Ram2's bell a few times to wake him up.

So I packed up my stuff and got ready. This time I did not forget to wear my fedora. We had our breakfast and realized that a number of people had left early, either for the venue or to meet someone in the city. When we went out to our bus, we found that it was not there. We started talking to rickshaw drivers and bargaining with them when one guy came up to us saying that he was here to take some people from the hotel to NIMHANS. That was us. But we weren't sure, so we had him call his boss and confirmed that it was indeed us.

Susmit: "Well, if he wanted to drop us to the venue then why are we wasting time calling people? Why not just pile into the bus and go ;)".

So we finally reached the venue, only to find that it was almost deserted. People started crawling in quite late and the place eventually filled up. I sat down with Kital at the Fedora booth and fixed my package submission for Fedora. At 12:00 I went up to Lennart's FSH talk, but did not find it as useful as the previous talk. He could just have combined this one with the last talk and done one marathon talk, but I guess that would have been too long. Anyway, it was time for lunch.

I was pretty listless after lunch because there wasn't enough time to hack on anything significant, so I decided to take a nap at the booth. I woke up to find that I had only 20 minutes to say good bye to all the people I came to know during these 5 days. Wait, a phone call. An automated message telling me that my flight had been delayed by half an hour. Well, I had some more time now, so I went up to the hack centre to check out who was doing what. I bugged Gopal for the Speaker kit and he finally shooed me off with some stickers. I told him that the coordinators had done a great job, something I managed to notice this time since I was not sitting in the corner and hacking like last year.

While I was roaming about, I entered the Gnome POTD and saw Oliviere Crete giving a talk on Telepathy. I sat down and listened. And I have to admit that I was quite impressed with the layout. I remember wondering why I was working on getting ayttm and libyahoo2 up to speed when such a wonderful effort was underway to do messaging the *right* way. Now that I think of it though, it is not the only right way to do things. While ayttm may not be as extensible as the Telepathy framework+Empathy, etc, it has a totally different use case. To be able to fit into a sub-1 MB package and work well with minimal dependencies. And it can work on *BSD. The workout participation for ayttm unfortunately fizzled out since it was pulled off the itinerary and it is not popular or cool enough for people to want to contribute to it. But I managed to make some headway into the chat window stuff and will hopefully get that out of the way soon. Next week I plan to work on the webcam stuff for yahoo at Rahul's request. OK, I digressed.

I had to leave the talk halfway since I was getting late. I stepped out of the hall and managed to say goodbye to everyone I recognized and could catch hold of. I managed to find Pradeepto just as I hauled my bags up to leave. We said our goodbyes and I left for the gate, trying to find a rickshaw. But what I found was a bus, a BIAS-7 going to the airport :)

So I'm now sitting in the airport lounge reflecting back on one of the best events I've attended so far. This was very special for me because I got to know a lot of very good guys: Pradeepto, Aanjhan, Sayamindu, Joerg, Gopal, Susmit and so many others. The best part of the week was the BoF sessions all of us would have in Pradeepto's room, talking about foobar and sharing stories. I did not have too many uber hacks to talk about through this week, but a lot of cool incidents that seemed to make a big difference to the way I thought about the Indian FOSS movement and the people involved.

This was fun. I hope I get to do this more often.


FOSS.in/2009 Day 3: The blues
trek and hack
[info]siddhesh

The penultimate day of FOSS.in/2009. And me and Kartik got up even later than usual. We managed to get ready quickly and reach on time for breakfast, only to realize that practically everyone else was late. We left for the venue (eventually) at about 10:30. Philip had already arrived at the venue and he asked me about the ayttm workout, which was to happen today. I thought it was cancelled, but we decided to go for it anyway. So we spent the time before lunch in the hack centre with Kartik and Ram 2 going about their Debian workout and Philip scp'ing his latex presentation back and forth on his server since he was stuck with his Mac.

I came up to the hack centre to work on ayttm but saw Russell Nelson teaching a bunch of people how to solder stuff. This got me excited since I remembered my my childhood, with me trying to make some weird stuff with wires and pins (yes, a couple of them exploded too :P) and trying to "repair" stuff, eventually breaking them. So I had to get up and see what he was doing. That way, I would be putting the soldering iron my wife recently got me, to constructive use.

Russell explained some basics of soldering and then went on to show a small example of attaching an LED and resistor to a small microcontroller board. I stuck around to see how soldering was done and then finally decided to skip the software part and get back to ayttm.

We sat down to hack again after lunch, but Philip vanished after a while, probably to prepare for his talk. I continued trying to get some stuff together while we also battled with a relatively unreliable wireless connection. The organisers finally pulled down the wireless in the hack centre since they were overloaded. I spent the rest of the time mucking about with nothing in particular. All the while, it was quite entertaining listening to Rahul Sundaram, Kartik and Ram2 discussing Debian and Fedora release cycles.

Finally it was time for Philip's talk. While I got up to go down to the hall, we were joined by a bearded guy who came up to talk to Ram2. I casually looked at his tag and realized that he was Baishampayan Ghose. I have only probably conversed with him or read his emails on mailing lists or heard about him, so meeting him in person quite suddenly was a surprise, which kinda left me a bit tongue-tied ;). He recognised me instantly (probably due to the tag) and became the first person other than Philip and Kartik to ask me about ayttm/libyahoo2 :). We then walked down to the hall to attend Philip's "Shut up and Hack" talk.

I thoroughly enjoyed the talk, mainly due to the spontaneity. He basically talked about reasons for which hackers hack. Not just software hackers, he talked about hackers in general. He then went on to make some useless and some other useful little snippets of code to explain how one could hack. The point was to not call a committee to decide when, where and how to scratch an itch; just scratch it now.

Bluesmoon was followed by Blues before Sunrise, which was strictly OK, because of which I walked out after the first few songs. We had a fun time with Himanshu and Kartik finally getting the better of Rahul Sundaram in pulling his leg. Pradeepto was lying down in a corner and soon after, everyone was gathered up around him and were chatting away. Gopal came up to chat too and once again managed to call me the "bakra who Philip caught to work on ayttm" :P. He had said exactly the same thing at last years FOSS.in. It turns out that Philip had asked Gopal if he could contribute to ayttm, which Gopal was able to conveniently turn down since he soon joined Yahoo! :P

All this was followed by a speakers dinner at the hotel, which was quite a lot of fun too. Kushal had 7 bowls of soup till the time I was hanging around and was probably looking to have more. There were occasional shouts of "PulseAudio sucks!", "PulseAudio rocks!", "KDE sucks" and "Lenny rocks!" just to pull each others legs. It was quite cool to watch a lot of people get a little drunk on beer and having fun in general. Me, Kartik, Aanjhan, Ram2 and Pradeepto then came down to Pradeepto's room and were chatting about foobar right up to about half an hour ago. Now here I am sitting in the hotel room with Kartik fast asleep. I'll go to sleep now.

This has turned out to be a long post. Yes, it was quite a long day.


Coming up soon: FOSS.in
trek and hack
[info]siddhesh

FOSS.in begins on Tuesday next week at Bangalore. I will be conducting two workouts, one on Ayttm: Face Lifts, Porting and Hacks and Libyahoo2: Getting up to speed. As of now, the libyahoo2 workout is set for Day 1 and Ayttm is set for Day 4. This means I will miss the Debian POTD talks and workouts, which I really wanted to attend. Also, Philip has his Shut up and hack workout scheduled on Day 4 too, so we may have to try for a reschedule for either ayttm or shut-up-and-hack.

I've also started hacking on the chat windows stuff in ayttm to make them the way I want them to be. If I'm not done with them by the time I get to FOSS.in, I'll most likely continue hacking on it during the event and/or during the Ayttm workout. Those who like the dirty details may read on.

The current chat windows and chat room code is slightly bulky and a lot of code is duplicated. Also, the chat logic and UI stuff is all mixed up, which makes reading code difficult in some places. I'm trying to change this into a slightly different model. Introducing Conversation, which defines pretty much from individual chats to conferences to chat rooms. This component will be responsible for all chat logic. This in turn simplifies my ChatRoom stuff since it is just a buddy list more than the ChatWindow. Also, both ChatWindow and ChatRoom will only be passing events to Conversation and dumping HTML messages (from Conversation) to their respective chat boxes. I'm aiming to reduce the code size as well as build in some extensibility (service specific toolbar buttons for example) as a result of this rewrite. Another unintended result would be a slightly reworked UI. Read the ayttm journal or follow the ayttm-devel mailing list to know what's going on there.


Ayttm 0.6.1 — The work starts now
trek and hack
[info]siddhesh

Just did an ayttm release. This is to lay groundwork for xmpp rewrite, which Piotr will be doing after I lay down the framework. The idea is to make a clean and light xmpp framework and then have even lighter plugins on top of it for gtalk, jabber, etc. Usability and extensibility FTW!

Tags: ,

Ayttm Workout proposal at FOSS.in/2009
trek and hack
[info]siddhesh

I just submitted an ayttm workout proposal for FOSS.IN/2009. Hopefully it will get accepted this time and we get some real work done. I want to get a 0.6.1 and 0.6.2 out before the event begins so that there is a nice clean base for people to work on.

I hope the workout gets accepted.

I hope we get worthwhile contributions.

I hope they have the cold caffeine too this time :D

Free food ftw!


Moving Ayttm to git
trek and hack
[info]siddhesh

I am importing the ayttm cvs repository to git as I write this. This was something I had thought of earlier, but never had any motivation to do so since things just worked without it anyway. It was Kushal who made the suggestion to me, saying that it would be easier for the Fedora guys to keep in sync with development upstream. I take it from this that the Fedora community will contribute some code to ayttm in the future, which I will be able to pull in easily in the future.

Tags: ,

Ayttm progress
trek and hack
[info]siddhesh

Right now, the cvs version of ayttm looks pretty good. We've been able to get in YMSG16 support, MSNP15 support and a lot of fixes in the GUI and jabber. I finally got rid of the custom dialogs code in ayttm and Piotr has done a lot of work with the state/status messages. The netv2 code also seems to be looking quite good since nothing seems to be breaking in it of late.

There are a few filler functions that remain to be implemented in MSN so that it does not crash. Also, both yahoo and msn need file transfer and invitations -- I am not done with that either. I have been threatening to do a release for some time now, so I might just act out that threat in the coming weeks. So these are busy days.


Ayttm updates
trek and hack
[info]siddhesh

First goal of getting yahoo working on YMSG16 is done. Read more about it in the ayttm journal. Roadmap for yahoo support is now:

  1. Fix the little things
  2. File Transfer

That will come in later. Most likely once netv2 merges into trunk. Now I will be shifting focus to MSN and other tiny protocols (livejournal, smtp, etc.) on netv2.


Sweating it out on YMSG16
trek and hack
[info]siddhesh

I finally finished writing a working implementation of the YMSG16 authentication as described in this article. The authentication seems to be working quite well, but nothing else does. The server still does not respond to the older binary type messages. So the next thing I tried was to wireshark the windows based yahoo messenger ( my employer provided the windows box for me :D ) and I found out two things:

  • The Authentication probably is what is described in the carbonize site, but there looks to be a different way to get the initial challenge string
  • All messages go to and from one server in the form of HTTP POST and responses

There some more cookies involved as well, which is what Adrian was probably talking about in the comment to my previous post. Thankfully, since ayttm is on YMSG12, we are still online unlike pidgin, so no need to rush in a fix for this just yet. That said, the popup says I have until August 15th till YMSG12 dies too. I need to see how pidgin has fixed this. Maybe the fix is much simpler than revamping everything to do what the windows YMSGR is doing.

Update: I was wrong. I sent the wrong message to the server after authentication — forgot to add the challenge digest, which is why it barfed on me. Work is on now for stuff after the auth :)


What do we need for YMSG15?
trek and hack
[info]siddhesh

Ayttm needs to go on to YMSG15. So I decided to do a small test to see what could break if we just change the protocol version sent to Yahoo. So I advanced the protocol version from 0x00000c to 0x00000f in libyahoo2. Also, I enabled debugging in libyahoo2 so that it could dump packets that it did not recognize. Here's my brain dump of the little experiment:

  • Some packet numbered as 0xef. Don't know what that is
  • File transfer will change, as I had seen from the last time I had fixed file transfer for YMSG12
  • Gennady Feldman had added some service codes into the libyahoo2 for YMSG13, which seem to be coming in due to the move to YMSG15. The 0xf0 and 0xf1 above are a result of that. Also, messages to rename groups and move contacts between groups seem to have changed
  • I got a 0xf0 message, which seems to be a list of buddy statuses, including mine
  • A 0xf1 message, which seems to be the complete list of buddies. So I don't really need to fetch them from cab.yahoo.com, do I?
  • Another thing that seems changed but did not affect me this time around seems to be the login procedure. I'm planning to move to YMSG16 for that since I have more complete information on how it can be implemented.
  • To get YMSG16, I need SSL. To get SSL, I need to update libyahoo2 to move to netv2. So obviously this needs to go into the netv2 branch

netv2 does not seem to be ready just yet, Philip had problems getting gmail to work with netv2. There's a bit of tightrope walking with multiple threads and SSL. Hopefully I can figure out what the deal is since almost everything is starting to use SSL. Does anyone want to get their hands dirty on netv2?

But couldn't I just open up libpurple and get that stuff in? Yes, but it won't be fun enough would it? :)


First commit from work...
trek and hack
[info]siddhesh

Yes, I can now work on ayttm at my workplace as well. I joined Red Hat last month :D

I had to replace gtk_tool_item_set_tooltips() function in various places since it is broken in the latest libgtk. Anyways, it has been deprecated since some time now, so no harm in that. The only big effect is that I had to bump up required gtk version to 2.12.

Anyways, once I get my bearings right at work, I should be able to contribute more regularly :)

Also, we need to push ayttm into Fedora.


FOSS.in
trek and hack
[info]siddhesh

A great event to go to if you want to know exactly how many and how much Indians are contributing to FOSS. Major contribution seems to be coming on the KDE and the Linux kernel front.

Workouts must have been great -- didn't get a chance (nor was I adequately prepared) to go to any of them since I was busy with my own little workout -- trying to get asynchronous connection going on ayttm. It's almost working now, except for SSL stuff. It has nothing to do with connection management really. It has something to do with threads, callbacks and the main loop. If you look into the implementation of eb_do_no_callback_dialog () and imagine it to be in a different thread than that in the main loop, you'll have an idea of what I'm talking about. I hope I'll have it fixed before I leave for Mumbai on Monday.

Oh, and met Philip for the first time in person. We had an ayttm BoF session today, in which I struggled with the SSL stuff and Philip and Pradeep tried to get ayttm to compile on Pradeep's laptop.

Tags: ,

Exhausting week... with a hopeful end
trek and hack
[info]siddhesh

It's been (and continues to be) an exhausting week at work. I've been away from home from 6:00 AM to around 11:00 PM everyday and been buried upto my my brow in production problems, UAT releases and the "Why the hell is this written like this". Yahoo, MSN File Transfer have taken a reluctant back seat.

Between all this I got a response (two actually) to my request to my employers to sponsor my trip to Bangalore for FOSS.in if I get a chance to talk on Ayttm. I had made the request two weeks ago and finally got an encouraging response. Turns out that we have an "Open Source Group" and their Head seemed to be all for it.

Now waiting for FOSS.in/2008 to open up registrations so that we can propose a Project Day for Ayttm.


Yahoo File Transfer
trek and hack
[info]siddhesh

There seem to be two ways to do file transfer in Yahoo, as I found out from wireshark today. One is by POSTing the entire stuff, the Yahoo File Transfer packet as well as the file to the file transfer server (Kopete does this) and the other by first sending a file transfer packet to the server and when the receiver accepts, send the file (Pidgin does this).

We do the former in Ayttm, but botch up the sending. As a result, our file sending is broken with both messengers whereas file receiving works with Kopete.


Ayttm IRC fixes... and much more
trek and hack
[info]siddhesh

Another weekend without my wife... which means another full weekend spent hacking as opposed to the regular few hours every other day.

I finally finished off and committed the /whois bug fixes that George had reported a while back. In the process I found that the buddy management (adding, messaging, signing on, signing off, etc.) was completely broken in IRC. So I had to shuffle a lot of things around to finally be able to chat with users on IRC as well as add them to our chat list.

While I was busy doing this, I also remembered that there were a few low priority chinks in the html parsing code. For one, text inside <body> tags are supposed to stretch across the entire textbox window. I still haven't been able to figure it out but while trying it I thought about some other things like rewriting the entire html parsing in lex and/or yacc. That would mean that my code would be a lot simpler as well as a lot more robust.

Also, writing on a GtkLabel instead of a GtkTextView/Buffer could simplify some things. At the same time though, I would have to think a little about things like link clicks/double-clicks, embedding widgets, images, etc. I guess if that's doable then it's an attractive alternative.


IRC Fixes
trek and hack
[info]siddhesh

There was an silly little memory leak in the CTCP code in the new libirc which was causing Ayttm to crash every 10-15 minutes. Turns out I had not left any space in the string for the ending '\0'. Fixed and it's been running fine for an hour now.

I no longer show popups; I've reverted to the old style of showing notices, except with a little difference. I show all notices in a notices window. I've kept it as a chat room window so that in future one may even enter commands there.

Next up, I need to get the channel list window working. And then finally, the 'auto-reconnect to chat room' option. It's been broken for a while it seems.


Chatty windows
trek and hack
[info]siddhesh

Chat windows in ayttm have given me a bit of a headache for the past couple of nights. There was an innocuous bug that caused a crash when a user had chat windows open and then decided to switch to tabbed chat, opened and then closed the tabbed chat window. It was quite easy to see at first why that happened -- window closure was done based on the tabbed chat preference, and once you have both tabbed and un-tabbed chat windows, it becomes a bit of a mess.

So I finally decided to change the logic behind it all and decided that windows would close based on whether they had a notebook at all. That stopped the original crash case but introduced ten new ones. That was when I found that the smiley window was being deleted twice, the window close signal was attached only to tabbed windows and all new chat windows were added to the chat window list on creation, but only tabbed chat windows were deleted on closure (phew!)

So finally tonight, we've got the finished stuff (hopefully) where all the above issues were taken care of. Gotta love this stuff :)


Jabberin'
trek and hack
[info]siddhesh

Decided to give Jabber a spin on ayttm with jabber.com and ran into a bit of a wall. It somehow seems like Jabber support is more or less broken in ayttm; I couldn't even get it to log in, or at least quit with an error message. It just kept 'loggin in'. Ayttm does work for gtalk though, so it's probably got something to do situations where SSL is not involved.

I've just got hold of the XMPP Protocol RFC and XMPP extensions and hopefully will have time to compare with our implementation over the weekend.

Update 4th Nov 2007: Heh, looks like I didn't need all that. A couple of lines was all it took to get it all to work.

Tags: , , ,

Back to Hack...
trek and hack
[info]siddhesh

... once again. It's been a long sabbatical away from hacking; almost a month and a half. Coding at working just isn't the same; you have to do more talking and less coding, which can get really boring at times. Also, the challenges and constraints are mostly artificial (must use this toolchain, must use that framework, must not reduce bloat because some dev long ago believed that it was a performance tweak -- don't ask).

Anyways, I've put in a tray icon for ayttm. I was going through the gtk APIs for some possible tweaks to GtkTreeView (I'm still not very happy with how the main status window looks) and I stumbled upon GtkStatusIcon, the tray icon widget. Since it was so easy to implement (have to compliment the gtk devels for this) I went for it right away. It's already checked into cvs, Kartik may release a deb for Debian soon if it all goes well.

Oh, and I was going at the tray icon, I also gave the ayttm icon a drop shadow. Thought it looked quite neat.


Ayttm Release
trek and hack
[info]siddhesh

It's been more than a week since the first ayttm release after 3 years, and only one bug report filed in as of today. That bug report too is not much of a bug really; it's more of a support request since the user was not able to compile. Since he's not responded, it looks like he's either given up or managed to compile but not cared to come back and tell us.

So only one bug in over a week could mean one of two things -- either the release is essentially bug-free or nobody's really using it ;)