[Contents] [TitleIndex] [WordIndex

This report is part of Contributor - Scilab backend to Cantor project.

Scilab backend to Cantor report - 1 August 2011

Hello readers,

This report is one of last reports of this project in the schedule stipulated. Therefore, I will describe some steps of this work, starting in the initial project, changes that have occurred, challenges and the features that are implemented and the features that are missing - for now.

Initial project - from call_scilab API to KProcess

The project aim is develop a backend to Scilab in Cantor, a KDE software to mathematical/scientific programming. Cantor have backends to various mathematical free softwares, like Maxima, GNU Octave, Sage and more.

Scilab is the main free software to mathematical/scientific programming avaiable. So, develop a Scilab backend to Cantor is, in the true, provide a new IDE to Scilab, alternative to default Scilab IDE - and test Qt technology to use with Scilab, I think.

At the beginning, in the firsts talks about the implementation of this project, I imagined use call_scilab API because Cantor - and KDE softwares in general - are implemented in C++. call_scilab API allows to Scilab enviroment be run in C/C++ code. In the fact, I did some tests about this possibility.

But, knowing the codes of others backends to Cantor, I discovered that exist a class in kdelibs named KProcess (derived from QProcess, of Qt) that initialize a thread of other program and allows the communication between this two softwares through standards streams. How the others backends are implemented in this way, I resolved use it to Scilab backend too.

So, the main change of project was to use KProcess in place of call_scilab API.

Features Implemented

Below, a list of features implemented and working in project Scilab backend to Cantor. And, attached to each item, screenshots of the functionality mentioned. More details and screenshots are avaiable in my personal blog, in posts with the tag gsoc2011-scilab-backend

Configuration Screen of Scilab in Cantor


The first work that I did in this project, a screen to configure path to scilab-adv-cli and to select if Scilab ploting will be attached in Cantor worksheet or no.

Selection Screen of Scilab in Cantor


The screen enable select a default backend to Cantor in this time. I added Scilab options in here.

Standard Streams Support in Scilab

To use KProcess, is necessary that the process to be initialized use standards streams, that will allow communication between the programs. But, originally, Scilab no supported it.

So, I implemented this support and the communication exist now. This feature will be release in Scilab 5.4 or in the next major version of Scilab, I think. So, Scilab backend to Cantor will support only Scilab 5.4 version or latter.

Syntax Highlight


Syntax Highlight was implemented in this project using XML files. I used the Scilab function getscilabkeywords to take all Scilab keywords and I created a XML file with this words.

Next, the Scilab backend read the inputs of users and compare with the words that are loaded in computer memory. If the word in input space exist in XML file, it is highlighted.

Tab Complete


Tab Complete is a "feature sister" of Syntax Highlight. The implementation of Tab Complete uses XML file too, the same of the Syntax Highlight.

In this case, when a user put some letter, if he press TAB button on keyboard, the Scilab backend will suggest all keywords names that have the same letters too.

This feature works to Scilab predefined functions and enviroment variables too.

Plot Diagrams Outside the Cantor Worksheet

Scilab backend not yet allows load a plot diagram in Cantor Worksheet, but is possible plot a diagram outside the Cantor.

Features Missing

Now, some features that are not implemented yet.

Variables Syntax Highlight


Syntax Highlight works, but no to Scilab enviroment variables - or no in my computer.

The figure above is a screenshot of Alex Rieder, original author of Cantor. In the computer his, Scilab syntax highlight works with Scilab enviroment variables...

I and he are working in this.

Plot Diagrams in Cantor Worksheet

The other problem is with to load a plot figure in Cantor worksheet. The graphical parts of Scilab depends of video card of computer, and my SiS video card no help in nothing...

So, I will work in this, maybe using xs2* (xs2png) to try generate a graphical file without generate a new Scilab plot window.

Rocks on the Way

Finally, in this last bi-week I had some problems with my computer. He broke and it took just over 10 days to repair. Delayed my last activities, but I will work to recovery this.

Other problem is that I use Mageia development version ("Cauldron"), and occurs from time a problem in Scilab. For example, now exist a bug that prevents me from running Scilab, related to libtk. I did a bug report about this.

Conclusions and Next Bi-week

Seeing what's missing to complete the project, the time remaining and the schedule in general, I am satisfied with my performance and I believe that everything will be working in the stipulated time.

In fact, I am sad with these specific problems with my development framework (my computer + my Linux distribution), which ended up disturbing me. But do not believe this will prevent you from finishing the project.

The next bi-week I'll be in Berlin, participating in the Desktop Summit. At this meeting, I really hope to finish these two pieces of missing features.

To conclude, I appreciate the help and support (and above all, patience!) from my mentor, Sylvestre Ledru, the Scilab development team that helped me a lot when I needed and Alex Rieder, who gave me some tips on the code of Cantor.

2022-09-08 09:26