Hell Oh Entropy!

Life, Code and everything in between

libyahoo2 to get chat rooms soon

Posted: Aug 06, 2010, 09:24

Kay has been working on the libyahoo2 project as part of the Fedora Summer Coding initiative. He's been working on chat room support and things are looking quite good so far. Kay has finished working on the core functionality of logging in, joining and leaving rooms; only the chat room list functionality is remaining. He was a little shy of interacting with libyahoo2 upstream earlier, but he has been working on it since.

Looking at the pace of the project so far, we could have Kay's code merged into upstream very soon. Following this, me or Ray van Dolson will do a release in Fedora.


Yahoo chat future and libyahoo2

Posted: Jul 01, 2010, 17:52

Philip had recently posted on libyahoo2-users that Yahoo is planning to open its instant messaging platform API to the public. It has been delayed a bit since then, but it is surely due.

So how does this change things for libyahoo2 or any other FOSS implementations? For one, the fun of digging through binary data and trying to make sense of it will be gone ;) But on a serious note, we can hope to have some more consistency in behaviour and support will definitely improve. I'm not very keen about the fact that the support will be over HTTP, but I guess it works well for them. For now we can only wait for their announcement before we know what the entire thing looks like. If it is anything like the messages that the current official yahoo! messengers send, then it's only really a wrapper around their old pain of a protocol. But this does not really use JSON, so it is likely that they're writing a fresh implementation. In any case, there is still time for it and in that time, we have some decent work going on on the libyahoo2 code base.

In other news, Kai Zhang has been working on implementing chat room support for libyahoo2 as his Fedora Summer Coding project. His code can be found here. Other than the brief comments in the git logs, everything seems to be quite ok. A bulk of the feature set is already in, so that is pretty good progress. Once the entire feature set is completed and tested, I will have them included in the main libyahoo2 source tree. Following that will be a release and a rebase on Fedora. This will be a good rebase compared to the ugly one the last time around, where I broke all API compatibility in an effort to revamp the authentication support.


Fedora Activity (half) Day

Posted: May 31, 2010, 21:24

The FAD (Fedora Activity Day) was announced over a month ago with an intention to get some real work done during an event. I really only had a chance to participate in 1/4th of the FAD (1/2 day on Saturday), since I had to fly to Bangalore on Saturday evening to spend the weekend (or whatever was left of it) with family. But that was enough to get whatever I wanted out of the event.

Being pretty much a newcomer into the Fedora community, there wasn't much that I could think of to directly contribute but I wanted to do something. I really only maintain 1 package, which also does not have much traffic, so I wasn't exactly brimming with ideas. Rahul helped me there by asking me to do an Autotools workshop. I was also looking forward to meeting some of the guys I had met at FOSS.in last year; Susmit, Hiemanshu and Sayamindu. I could not meet Hiemanshu (did he come at all?), but it was good to meet Susmit and Sayamindu after quite a long time.

We started the day with my autotools workshop; I hope at least someone found it useful. I demonstrated the process of autotoolizing a simple C program using the same example I used during my Fedora classroom session earlier this month: linkc. The main reason I keep choosing this program is that I am too lazy to find or write anything on my own. The other reason is that the program helps to cover quite a few things at one go -- it is small, it has an external dependency, a subdirectory and some distributable files. So all those things win over the fact that the app just doesn't work as advertised. Oh well...

Once the only "session" of the day was over, everyone announced their aims for the two days while Sankarshan distributed some swag (t-shirts, stickers and buttons). After that it was pretty much everyone working on their own stuff. Me too.

Only a couple of days before FAD, Ray van Dolson added me as a co-maintainer for libyahoo2 in Fedora so that we could share the workload of doing releases/bug fixes. After discussion with him, I decided to do a libyahoo2 release into rawhide during the event. So I finally had something that I could do, which was much closer to Fedora.

I knew that the release would break freehoo, a console messenger for yahoo since libyahoo2 1.0.0 broke all backward compatibility, so I set about fixing that. The result was a bug report with a patch to fix freehoo to build with the latest libyahoo2. Finally, I also changed ayttm to dynamically link against libyahoo2 instead of cloning the code base all the time. There was absolutely no incentive in maintaining two code bases for it, so it finally had to go.

By the time the ayttm change was done, it was time to leave. But before that, Kushal asked me to take a look at libraw to see if I could pitch in with something there. So I will be looking at autotoolizing it and packaging it for Fedora. I was supposed to do it today, but all of my day was spent in playing catch-up with work at my day job. Maybe I'll have more time tomorrow for it.


libyahoo2 is now 1.0.0

Posted: Apr 21, 2010, 08:37

There have been a number of code changes in libyahoo2 since some time now, with Gennady Feldman and later me pitching in. So it was finally time to do a release. My primary motivation for this was to remove libyahoo2 code base from ayttm and have it link dynamically to libyahoo2. I hope Ray van Dolson packages libyahoo2 for Fedora soon, so that I can pester Minto to package ayttm with that patch too.

The YMSG16 support changes in 1.0.0 will break things for many people using libyahoo2, but that was necessary. I wanted to avoid tying libyahoo2 to a specific crypto library for SSL use and also reduce the overhead of maintaining that code base. The result of this change is that it removed all of the networking code from libyahoo2 as well, which reduced maintenance overhead even more.

Another big change was the removal of the ability to bypass the callback struct and link functions directly. It would make things difficult when you're trying to find out in your configure script if the library is installed. One would have to write a test program in the autoconf, which would have to have all the callbacks implemented, to be able to compile successfully. That is painful. Also, The approach is much more extensible compared to earlier the approach.

There are a number of things that we still need to get done in libyahoo2:

I will be submitting a Fedora Summer Coding idea for libyahoo2 soon to add chat room support as a mentor. The major skills required for this would be C and the ability to read and understand wireshark dumps.


FOSS.in/2009 Day 0 done

Posted: Dec 01, 2009, 22:43

Finally back at the hotel after the first day of FOSS.in. It was a good first day despite the delays in schedule, mainly because I didn't care much about the schedule ;)

Kartik and I decided to have our workouts at the same table and it turned out to be a decent idea since we did not really have people swarming for our workouts. I assumed that the pre-workout talks were chucked out since Atul Chitnis said that we can start right away at the hack centre, but it turned out to be otherwise. The result was an unprepared /me struggling with the collar mic screeching every other minute and /me rushing through the libyahoo2 slides as if there was no tomorrow.

It was not too bad in the end as we had one person asking a few things about libyahoo2 and Debian. I was able to get some work done too; see the Progress section in the libyahoo2 workout page for details. Also, thanks to Gaurav "Tazz" Chaturvedi, who gave me a packet dump of his windows yahoo messenger 10, which included everything from regular messaging to chat rooms. I'll get around to doing something about it soon, not tomorrow.

As for tomorrow, I'll be putting on my Fedora for the Fedora Project of the Day. I'll be trying to package gource, a source code history visualizer. Kartik showed me this app today and it blew me away with the wonderful visualization of the ayttm source history. This will also be my first package submission to Fedora and my first foray into something other than coding. Let's see how it goes.


FOSS.in Day -1: Arrived at Bangalore

Posted: Nov 30, 2009, 20:53

I've finally made it to the hotel after a one and half hour flight and (ironically) a similarly long bus ride. But it was quite smooth, with no delays either on departure or arrival. I've settled myself into Room 101 and am now contemplating dinner. My room-mate will most likely be coming in tomorrow morning. The Wifi signal is pretty weak at around 45-50%, so I think I'll have to settle somewhere in the lobby for better signal whenever I need it.

Day 0 of FOSS.in begins with the libyahoo2 workout for me. I've got a bunch of protocol dumps using the Gyache yahoo messenger (yes, the hideous looking buggy one). I would not dare look into the code of that nightmare of a messenger, so I'm happy with what I have so far. I think I have got a handle on the chat room packets, so I might give that a shot tomorrow. The buddy picture stuff is also pretty decent, although I think we'll have to do a bit of trial and error with the packet sequences a bit. Gyache seems to have a bug in its picture stuff and it sits in an infinite loop uploading pictures forever.

I've also got the address book update packet dump but here again gyache is buggy. I think we can get it working despite that though since gyache is buggy with both address book query as well as update. We have got the address book query right, so we're definitely on the right track.

I have a feeling ignore/unignore buddy has not changed in YMSG16 and we may not need to fix it at all. I've been too lazy to actually sit down and test it though.

Finally, I hope some people get in some Windows laptops tomorrow so that we can get packet dumps of the official Yahoo! messenger doing some stuff. If that does not work out, I'll have to go back to work and get to it by myself some day.

Update: No Kushal, that's not day one; it's day minus one ;)


Coming up soon: FOSS.in

Posted: Nov 28, 2009, 15:58

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.


What do we need for YMSG15?

Posted: Jun 19, 2009, 00:44

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:

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? :)