I’ve been selected as a Google Summer of Code , 2018 student developer at GNU Octave. GNU Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with Matlab. It may also be used as a batch-oriented language.

A very heartful thanks to Kai T. Ohlhus, Doug Stewart, Ankit Raj and others who saw my potential and chose me for GSoC 2018.

My project is Octave Code Sharing. Community bonding period would include reading up material that’d be essential for the project.


This project aims to come up with a pan-octave implementation that could be used to connect to wiki.octave.org with appropriate credentials for publishing octave scripts that could be hosted for distribution using the MediaWiki API. Currently, no formal implementation is there but a proof of concept which was implemented as a bash script, later refactored to use JAVA’s interface to Octave. Since the network connection itself has latency and response time which are significantly large to get into notice, an Octave script, which will help in connection, will not be much of a performance killer. To maintain a stateless HTTP protocol, some information that would be needed will be stored as cookies with the help of Libcurl library. All this would lead to set up of RESTful services for GNU Octave which could be further extended to support the compatibility with MATLAB’s RESTful interface.


  1. April 23 - May 14

    Community Bonding Period: Get to know more about Libcurl and its implementation. Learn about HTTP request headers and stateless transfer protocol. Finalise location of files in the codebase that will be needed for code sharing. Study the existing work that has been done by the mentor. Study publish() and grabcode() functions. Study octave::url_transfer class. Learn about MediaWiki API and its implementation (backend working).

  2. May 15 - May 23

    Implement the Libcurl wrapper in libcurl_wrapper.cc/h. This would include the various abstractions such as ‘ALL’, ‘SESS’, ‘FLUSH’, ‘RELOAD’ that could be used by octave’s script to use Libcurl cookies to connect to the server. There’s a preliminary implementation for the same which was implemented by the mentor sometime back, which can be extended in this phase for a more general design.

  3. May 23 - May 31

    Add ‘wiki’ as an ‘output_format’ in publish() function. This would extend the implementation of private function __ publish_wiki_output__.m that is to be used to format a wiki published code.

  4. June 1 - June 10

    Non Coding period due to University major examinations.

  5. June 11 - June 15

    First Phase Evaluation - Write Documentation of the work done upto this point and other tests such as setting up the wiki installation environment for testing the script that would be implemented in point 6. Catch up with the work if anything is lagging behind.

  6. June 15 - June 30

    Implement wiki_login.m which would use the Libcurl wrapper implemented in point 2. Currently this file uses Java’s interface to octave. But with the wrapper, the file would become an implementation of RESTful services for ‘code sharing’ and will not be dependent on Java’s interface to octave.

  7. July 1 - July 9

    Implement ‘weboptions’ function. It will return a default ‘weboptions’ object to specify parameters for a request to web service. This function will use the libCURL wrapper that would’ve been already implemented. Current scope of the function would be restricted to four options, viz., ‘Username’, ‘password’, ‘Keyname’, ‘KeyValue’.

  8. July 10 - July 13

    Second Evaluation Phase - Write documentation of the work done upto here and other tests required for ‘weboptions’ function. Catch up with any previous work if left.

  9. July 14 - July 20

    Implement ‘webread’ function. This will read content from a web service and return data formatted as text. Other output arguments (cmap, alpha) will not be supported currently.

  10. July 21 - July 27

    Implement ‘webwrite’ function. This will put data in the body of an HTTP POST request to the web service.

  11. July 28 - August 6

    Buffer period for anything that remains. Complete documentation and testing for ‘webwrite’ and ‘webread’.

For now, libcurl_wrapper.cc/h would be placed in libinterp/corefcn but could be changed whether it should be used by default or on the user’s choice because someone might not want to connect themselves with wiki.octave.org. I’ve for now, merged two weeks, i.e from 15 June to 30 June because the main task would be include the wrapper implementation for connecting to the webserver. This may span upto two weeks and so is the reason for two weeks of the same task.

Additional Things to be done after GSoC is over:

The web function is already partially implemented. The task will be to finish the implementation with various arguments such as ‘-notoolbar’, ‘-noaddressbox’, ‘-new’ for MATLAB’s compatibility. ‘websave’, ‘ftp’ and ‘sendmail’ that are a part of RESTful services, will also be implemented. Any other part of GNU octave which currently might need RESTful services using cookies can be amended to use the implementation that would result from the project. The ‘webread’ function will be extended to read values into JSON format and images as well.

Thanks for reading, will be posting next update soon. Looking forward to a bug-free and code-some summer. :-)