Wednesday, August 20, 2014

Before wrapping things up

This will probably be my last blog post within the period of GSoC. I have come a long way from the being selected, then clearing the mid-term evaluation, now to the end of GSoC. The journey was quite great. I get to learn Genie(programming language), got a little glimpse of XMPP and lastly some flavour of Gtk(which is actually GIMP Toolkit not Graphical Toolkit what I used to think).

I would not have reached this far without the help of the mentors, specially anthuswilliams and Arc. Despite the difference in time zone, I didn't face much difficulty contacting them, though they are mostly available in IRC. I would like to thank them for their help and support and also giving me the opportunity to work as a GSoC student. Lastly, I would like to thank Google for organizing such an event where many students can participate and get exposed to real-life software development.

Thank you everyone for giving me such an exiting and sleepless summer( I used to code at night. :-P)

Thursday, August 14, 2014

Gnomesoy Preview

My proposed design of the gnomesoy is complete. Some of the functionalities are already implemented but not all of them are there. UI design is fully done though. Current implementation is written as a demo to work without making connections. The code to make it work by making the connections is there but currently commented and should be enabled after testing. 
Given below a video showing the gnomesoy in action.

Thursday, July 31, 2014

Gnomesoy - digging deep with Gtk3

The complete overhaul of the gnomesoy GUI is progressing pretty well. I think I will be able to implement the GUI like (almost) designed in the mock-up. The credit mainly goes to Gtk3. It has many widgets like - spinner, expander, stack, which are quite common in modern day UIs. The Gtk documentation is quite good, but many times you may keep wondering what this class will do, specially for the layout classes ? In situations like this Gtk UI designers like glade comes in handy. Though I am hand coding the UI, but glade helps in doing quick checks.

Thinking a little about the GUI revealed that there are mainly 3 different windows are there
  1. Login window
  2. Gnome soy main window
  3. Window where the launched game will run.
Now, I have to think only about 1 and 2 as 3 is dependent on the game and the window should only show them properly.


The login window is designed as shown above with fields required to create a pysoy client. It still needs a little bit of fixing though.

This is the current state of the main window. I am trying to get the grid like view only in the games tab as of now. As this just needs to be replicated for the other tabs.
The window looks fine but there are still things to be done. Icons needs buttons and actions. One spinner to show activity. But that's all for now.

Wednesday, July 09, 2014

Getting started with Gnomesoy

So, I have cleared mid-evaluation of GSoC and I now I have to start working on 2nd phase of my work, that is modify gnomesoy(an existing pysoy client) to add support for accessing bookmarks.
I started with cloning the repository, as it is not available in AUR(I could make one though). Started off by building gnomesoy. But it was failing to build. I was getting one error
error: The type name `Gee.Traversable' could not be found
Arc told me it has something to do with libgee. But in the configure phase it was not checking whether libgee is available or not (have to fix this one). One crucial information that Arc provided is that gee-0.8 is actually newer version than gee-1.0 (what the heck!). Then I found in the file "src/wscript_build" in the list of packages it has gee-1.0. Changing that to gee-0.8 fixed the build error. First hurdle clear.

So, now I tried running it. But what I got is a small window with title "GnomeSoy" instead of some proper GUI.
Time to look at the code. There is only 4 source files. What I found is that the window is made using GTK. The previous developer had tried to create some menu with licensing information and some basic stuff. It was not added to the window so I was getting a blank window.

He(she?) also tried to display the pysoy client within the window using OpenGL but the code is fully commented out. May be it was not building properly, have to check that also.

So, what I found I have to do is
  1. Read a little bit about using GTK and GTK in Genie.
  2. I have to redesign the GUI.
  3. code for pysoy support.
 That's all from me for now.

Thursday, June 26, 2014

Sweating and Coding

I was hearing about Google Summer of Code for past quite a few years. I used to see the program being announced, many organizations are being selected. From big names like Debian, Fedora, The Linux Foundation and also many organizations that I never heard about. But still I was afraid to make the jump. Thinking so many things I have to know for the proposal only, how can I even be selected.

Three years have passed like this, just watching. But this year I thought lets make the jump and lets see what happens at the most they will reject me. And Whoa! I got selected.

My proposal was to implement bookmarking support in pysoy library. In the first few days what I found out
  1. libsoy(library of pysoy) is written is Genie. So, I have to learn it then only I will be able to code.
  2. pysoy uses XMPP for user authentication. 
That meant, I need to acquire some idea of both XMPP and XML as XMPP messages are sent in XML format. Also the bookmarking support standard is drafted in XEP-0048. So I had to read that also.

My work till now consisted mainly of two parts.
i) writing the JID class for handling and validation JIDs.
ii) bookmark class providing the back-end support for getting, saving and deleting the bookmarks. 

And of course, reading things like XEP-0060, XEP-0029 required for these two.

For the JID class, I first thought lets do it simply by pattern matching. The idea failed because simply searching for @ and / wont help. As, according to the grammar (XEP-00 ) there may be multiple @ and /. Next two ideas - Recursive Descend Parser(RDP) and LALR parser constructing it by hand. Both ideas failed as the grammar was not in "nice" form as they give in books. It contained regular expressions(Now, I am thinking about it, probably it is in EBNF form). So, I went the middle way, a bit by pattern matching and a bit like RDP. What is not implemented is raising exception in case of bad JIDs.

The bookmarking standard draft is quite well documented in XEP-0048. But what I feel that the page is not self-sufficient. One has to read the publish-subscribe(XEP-0060) to get more idea. Otherwise one will have many question, like "what will happen if I change this value?" or "What will happen in case of error?". These are not evident when reading, but is bound to come when implementing. But I must say XEP-0060 was comprehensive enough. Another thing what I did not get in XEP-0048 is how to delete a bookmark. It should have been there. But deleting is written in pub-sub(XEP-0060).

For XMPP communication libsoy uses loudmouth library. Now its documentation is available in www.valadoc.org but for some classes(like Lm.MessageNode) only the names of the public members are given and not their details. So, many times I have to resort to original loudmouth documentation. Though they are given for loudmouth C API, the class and the function names are similar. So, it was not hard to navigate through it.

Right, those were some of my experiences till now, what I faced when coding. The mid evaluations have already started. I have coded the bookmarking part, but it still needs polishing. Now what it remains is building the GUI part using gnomesoy. I know its going to be much harder than this part, but I am kind of determined to complete this now, irrespective of whatever is going to happen in the midterm evaluation.

Saturday, May 03, 2014

IEEEXplore query API

Recently I was searching on the internet if it is possible to query IEEEXplore to extract keywords of the articles. I was searching for IEEEXplore APIs and without searching much I found this great site maintained by the folks at mit -
http://libguides.mit.edu/apis
This page lists some web repositories of that provides scholarly articles and link to APIs documentations.

From there I found that IEEEXplore provides one such API and you need to have access to the articles to get the results. That was not a problem for me as my institution already have IEEEXplore subscription. And here is the link to the API documentation -

http://ieeexplore.ieee.org/gateway/

So, I wrote some scripts that gets the XML records based on year and publication number and just prints them. Another one just opens the xml file and prints frequency count of the keywords.
Here is a link to the files on google drive.


Saturday, February 22, 2014

Moving...

Though I don't post a lot of things on this blog. But I have decided to move to my deviantart(http://miltus31.deviantart.com/) for posting work and thoughts regarding them.



Though it's more empty than this blog. 


This blog will remain there for other kind of stuffs.