GSoC – Port of R to QProcess

Hello, this post will be about what all targets I completed , what’s left and what I did during the last month.

During the first two months I had ported 2 back ends to QProcess, which includes Lua and Qalculate. For the last month I was left with 2 more backends , which were  R and Python .  Due to time constraint I decided that I will be working on just one of the two. Python’s code base was a bit large because of the two versions of Python(2.7 and 3), hence I decided to work on R.

Cantor’s R backend was broken, so my job to was to get it in a working state and make use of QProcess for all the communication.

R’s backend architecture was a bit different from the rest of the backends. It was divided into 2 parts

1.  RServer:
This is a separate application, that uses the R-API to run commands,
and exposes it’s functionality over DBUS

2. R backend
This implements the Cantor interfaces, and starts the RServer. It delivers
the commands to the server over DBUS, and connects to it’s signals to get
the result.

Due to such an architecture the code of R backend was quite complicated. To remove such complications we used R’s command line interface and made use of QProcess to connect to it. Instead of the multi step communication(rbackend->rserver->R API), we now have a simple one step communication(Rbackend->QProcess).

Previously R back end supported:
* Plotting graphs
* Tab completion
* Syntax completion(incomplete state)

Current Status:
* User can still plot graphs but the graphs are not integrated in the worksheet

* Tab completion- Not working. This used to make use of Rserver for getting the completions, but since we have disabled the Rserver tab completion is not working.

* Syntax higlighter – Same state as before. It just highlights the keywords(if,else etc) and not the built-in functions/variables of R

Overall, R back end is in a better state than before. We have more or less most of the functionalities working. The only thing that’s not working is tab completion. Hopefully in future we will able to make use of  R’s command line interface for tab completion. R back end also does not have support for variable management but it should ideally support this since R(language)  supports it.

With this most of what I planned to do during GSoC has been completed and the only back end left to be ported is Python’s.

The last 3 months have been great and a bit hectic for me, but nonetheless I enjoyed working on the  project. I plan to keep working on my project, complete what’s left and continue contributing to KDE.

I want to thank my mentor Filipe Saraiva  for being such a cool mentor that he is and for all the support he provided during the last three months

Lastly I want to thank KDE for giving me and others this opportunity.

Thanks and Happy Hacking 🙂

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s