Cantor: new features in KDE 4.14

KDE 4.14 was released in August 2014 but I did not have time to write about new features in Cantor for that release.

So, let’s fix it now!

New backend: Lua

Cantor family of backends have a new member: Lua, using luajit implementation.

This backend have a lot of features: syntax highlighting, tab complete, figures in worksheet, script editor, and more.

Cantor + Lua in action

Lua backend was developed by Lucas Negri, a Brazilian guy, and this is a reason for me to be very happy. Welcome aboard Lucas!

You can read more about this backend in a text of Lucas blog.

Use utf8 on LaTeX entries

When you to export the worksheet to LaTeX, utf8 will be used as default. This improvement was developed by Lucas.

Support to packaging extension in Sage and Octave backends

Now these backends have an assistant to import packages/modules/libraries.

Support to auto run scripts

python2_autorun

Auto run scripts/commands in Python 2 backend

Now Python 2, Scilab, Octave, Sage, Maxima, Qalculate, and KAlgebra backends have support to auto run scripts. You can configure a set of scripts or commands and they will run automatically after the worksheet launch!

Add CTRL+Space as alternative default code completion to worksheet

Default code completion command in worksheet is TAB key, but now we have an alternative command too: CTRL + Space. It will maintain consistence between script editor (where the default code completion is CTRL + Space) and worksheet.

Initial support to linear algebra and plot assistants in Python 2

I developed the initial support to 2 amazing plugins in Python 2 backend: the linear algebra plugin and the plot plugin.

First, let’s see the linear algebra plugin. In menu bar go to Linear Algebra > Create Matrix. A window to matrix creation will be open, as below. You must to put the values in the cells.

python3_linearalgebraMatrix creation assistant

After push ‘Ok’ button, the matrix command from numpy  module will be loaded in the worksheet, automatically.

python2_linearalgebra_resultNew matrix created

For now this plugin have implemented just the matrix creation.

Let’s see the plot plugin now. You can use it to create 2D and 3D plot. Let’s to do x = numpy.arange(0.0, 2.0, 0.01) and, in menu bar, go to Graphics > Graphics 2D. The window below will be open.

python2_graphicPloting 2D assistant

You can set some expression to be the Y axis (in this case I am using numpy.sin) and a variable name to X axis (this case, 2 * x * numpy.pi). You could to put just x in variable name to do a plot with the values of x.

After push ‘Ok’ button, the command using pylab will be load in worksheet to make the graphic.

python2_graphic_result3D plotting assistant have a similar way to create the pictures.

How you can see, to use this assistants we need to have some python modules in the workspace, and they must to have the same name used in the plugins. There are a lot of ways to import modules in python environment (import foo; import foo as [anyname]; from foo import *; etc), so to do a generic way to use it is impossible (well, if you have some idea I would like to hear it).

My choice was to import numpy, scipy, matplotlib and pylab when Python 2 backend is loaded by Cantor. Well, I intent to change it because that modules will be mandatory to use Python 2 backend correctly, and pylab is not longer recommended in recent matplotlib version. So, wait for some changes in this plugin soon.

In any case, I would like to hear the opinions of scientific python community about this features.

Future

For now we are working in Cantor port to Qt5/KF5. You can follow the work in ‘frameworks‘ branch on Cantor repository.

Donations

If you use or appreciate my work in Cantor or another free software project, please consider to make a donation for me, then I can to continue my contributions to improve Cantor.

You can consider make a donation to KDE too, and help with the maintenance of this great free software community and their products.

Month of KDE Contributor: From LaKademy …

In recent weeks I had an intense “Month of KDE Contributor” that began with LaKademy, the KDE Latin American Summit, and ended with Akademy, the KDE World Summit. It was a month somewhat tiring, hard work, but it was also filled with good stories, great meetings, new contacts, discoveries and, I can say, fun.

This post I will write about LaKademy and the next I will comment about Akademy.

logoazul_menor

The second edition of LaKademy took place in São Paulo, one of the biggest cities of Latin America, in FLOSS Competence Center of University of Sao Paulo, an entire building dedicated to studies and researches on various aspects of free software: licenses, software engineering, metrics extracted from repositories, social aspects of collaboration, and more.

This year I and Aracele were the conference organizers, and I believe that we could provide all the infrastructure necessary to LaKademy attendees had good days of work in a pleasant and comfortable places.

First day we had talks of collaborators, and one that most caught my attention was Rafael Gomes on KDE sysadmin. It’s amazing the size of the infrastructure behind the scenes, a solid base that allows developers to do their jobs. It would be interesting to promote more this type of collaboration to attract potential contributors who prefer this side of computing.

14923088670_415cfc44df_z

This day I presented a talk about Qt in Android, describing the development tools configuration in Linux, presenting a basic Hello World, and commenting on some softwares availables using this technology, specially the VoltAir and GCompris. The presentation is below (in portuguese).

.

Second day we had a short-course about Qt, presented by Sandro Andrade. Impressive his didactic and how he manages to hold our attention for a whole day without getting boring or tiring. This day I was helping the other participants, especially those who were having the first contact with Qt development.

The third and fourth days were devoted to application hacking and projects development. I joined in “task-force” to port Bovo to KF5, I started the development of a metapackage to install all KF5 packages in Mageia, and I started the port of Cantor to KF5. I also fixed some KDE Brazil bots on social networks.

15106702121_ff87d73880_z

Task force to port Bovo to KF5

Fourth day we had a meeting to discuss some initiatives to promote KDE in Latin America, and we started to use Kanboard of KDE TODO to organize the implementation of these projects.

Besides the work we had some moments of relaxation at the event, as when we went to Garoa Hacker Clube, the main hackerspace in São Paulo, an activity we call Konvescote; and also when we all went to Augusta Street, one of the famous bohemian streets in the city.

15086717746_ec5d444223_z

KDE + Garoa

However, as in all events of Free Software and KDE Brazil, the best thing is see old friends again and meet new ones that are coming to the boat. For the novices, welcome and let’s to do a great work! For the veterans, we still have a good road ahead on this idea of writing free software and give back to the world something of beautiful, high quality technical, that respect the user.

KDE Brazil team wrote an excelent post enumerating what the attendees produced during the event. I suggest to all who still want more information to read that text.

I leave my thanks to KDE e.V. for providing this meeting. I hope to see more contributors in next LaKademy!

Month of KDE Contributor: …to Akademy

In recent weeks I had an intense “Month of KDE Contributor” that began with LaKademy, the KDE Latin American Summit, and ended with Akademy, the KDE World Summit. It was a month somewhat tiring, hard work, but it was also filled with good stories, great meetings, new contacts, discoveries and, I can say, fun.

Previous post I wrote about LaKademy and now I will write about Akademy.

LaKademy had ended just one day before and there I was getting a bus to São Paulo again, preparing for a trip that would take about 35 hours to Brno, with an unusual connection in Dubai and a bus from Prague, the Czech Republic capital, to the city of the event.

Arriving at Brno my attention was piqued by the beautiful architecture of this old city of the Eastern Europe, something exotic for Brazilians. During the event I had some time to walking in the city, especially on some nights for dinner and during the Day Trip. I could calmly enjoy the details of several buildings, museums, the castle and the city cathedral.

It was the second Akademy I attended, if you count the Desktop Summit in 2011. This time I am a member of the KDE e.V., the organization behind KDE, so my first task was to attend to General Assembly.

I was fascinated how dozens of contributors from different parts of the world, from different cultures, were there discussing the future of KDE, planning important steps for the project, checking the accounts of the entity, in short, doing a typical task of any association. I was also impressed by the long applause for Cornelius Schumacher, a member of the KDE e.V. Board since 2002 and former president of the association. A way to show gratitude for all work he accomplished in those over 10 years in KDE e.V. Board.

In the end the day we had a reception for participants at Red Hat. I was impressed with the size of the company in the city (three large buildings). We drank some beers of the country and distribute Brazilian cachaça. =)

IMG_20140905_193708

The next day began the talk days. I highlight the keynote of Sascha (I believe he was invited to Akademy after Kévin Ottens have seen him lecture here in Brazil during FISL), and the talk on GCompris, software that I admire because it is a educational suite for children. Unfortunately, one of the lectures that I wanted to see not occurred, that was Cofunding KDE aplications. We were David Faure talking about software ports to KF5, and presentation of KDE groups of India and Taiwan in the end of day.

The second day of talks we had a curious keynote of Cornelius who presented some history of KDE using images of old contributors. The highlights of the day were also the presentations by VDG staff, the group that is doing a amazing design work in Plasma 5, and now they are extending their mouse pointer to KDE applications too. Great!

Another interesting presentation was on Next Generation of Desktop Applications, by Alex Fiestas. He argued that the new generation of software need to combine information from different web sources in order to provide a unique user experience. He used examples of such applications, and I’m very curious to try Jungle, video player that will have these characteristics.

Finally this day had a lecture by Paul Adams, very exciting. He shows that, after investigation in KDE repositories, the degree of contribution among developers decreased with the migration from SVN to GIT, the number of commits decreased too, and more. Paul has interesting work in this area, but for my part I think it is necessary to explain this conclusions using anothers concepts too, because we need to understand if this decreased is necessarily a bad thing. Maybe today are we developers more specialized than before? Maybe is the decrement of commits just a result of code base stabilization in that time? Something not yet concluded in KDE is that we came from a large unified project (including in repository level) to a large community of subprojects (today we are like Apache, maybe). In this scenario, is it worth doing comparisons between what we are today with what we were yesterday, based only on our repositories? Anyway, it is a good point to ponder.

In BoFs days, I participated in the first two parts of the software documentation  BoF – an important and necessary work, and we developers need to give a little more attention to it -; FOSS in Taiwan and KDE Edu in India. Unfortunately I could not attend to packagers BoF (well, I am a packager in Mageia), because it occurred in the same time of Taiwan BoF. Letś try again in next Akademy. =)

I like to see the experiences of users/developers groups in other countries; the management of these activities attracts me, mainly because we can apply either in Brazil. I left this Akademy with the desire to prepare something about Latin America community to the next event. I believe we have much to share with the community about what we’re doing here, our successes and failures, and the contribution of Latin American for the project.

Finally the other days I continued working on the Cantor port to KF5 or I was talking with different developers in the halls of university.

To me it’s very important to participate in Akademy because there I can see the power of free software and its contributors, and how this culture of collaboration brings together different people for development and evolution of free computer programs. Therefore, I would like to thank immensely to KDE e.V. for the opportunity to go to Akademy and I would like to say that I feel very good to be part of this great community that is KDE. =)

The best of all is to see old friends again and meet new people. When that e-mail address gets contours of human face is a very special moment for us who work “so close and so distant”. So it was amazing to be with all of you!

Akademy 2014 Group Photo – giant size here

And to finnish I desire a great job to the new KDE e.V. Board!

Those interested, most of the talks presented with video and slides are available in this link.

My TODO List for LaKademy 2014

logoazul_menor

Next week São Paulo, one of the biggest cities in this planet, will host the second KDE Latin America Summit – or, how we call, LaKademy!

The event will be held in the FLOSS Competence Center of University of São Paulo, an interesting center where academia, enterprises, and community works together to create, to improve, and to research free and open source software.

In this event, Latin America community will try a new thing: we will have presentations about KDE stuffs. In specific KDE events of this part of the world it is more common to have only hacking sessions, and KDE presentations and short courses are given only in more general free software events. This time we organized an “open” event to non-KDE contributors too – maybe in the end of event they will be new gearheads.

The event program have a lot of topics: artwork, porting software from GTK to Qt (potential flamewar detected =D), KDE Connect, and more. I will present an introductory tutorial about C++ + Qt + KDE on Android. The main study case to be presented will be GCompris, and it will be interesting to show a software with a same source code compiling and running on Linux and Android. I will to show another software too: liquidfun, a C++ library to liquid simulation (it have an amazing demo in Android); VoltAir, a QML-based game developed by Google to Android (and open source!); and maybe KAlgebra, but I need to compile it yet.

Yes, it is C++ and QML on Android!

For hacking session I will reserve a time to study the Qt5/KF5 port of Cantor; it is time to begin this work. Other thing in this topic, I would like to talk with my KDE colleagues about a software to help scientific writing… well, wait for it until next year. =) I will work in KDE Brazil bots on social networks to fix some bugs too.

For meetings, I expect to discuss about communications tools (my propose is to use KDE todo to help with promo actions management), and to contribute with evaluation of KDE Brazil actions in the country. Since last LaKademy (2012, Porto Alegre), we continues to spread KDE in free software events, and we can to bring several KDE contributors to Brazil too. Now we must to think in more and news activities to do.

But LaKademy is not only about work. We will have some cultural activities too, for example the Konvescote at Garoa Hacker Club, a hackerspace in São Paulo, and some beers  to drink in Vila Madalena district. More important, I am very happy to see my KDE colleagues again (Brazil, why so big?).

So, let’s to do an amazing LaKademy this year! Look at Planet KDE and Planet KDE Portuguese to see more news directly from the event!

I see you at LaKademy!

(or in Akademy, but it is story to other post :) )

imgoingtoLakademytamanhopequeno

Code completion in Cantor script editor

Some months ago I wrote about the new features available in Cantor from KDE 4.13 release. But I did not write about a new nice feature available in that release too – so let’s see the new code completion in Cantor script editor!

I coded a default syntax highlighting to each backend in script editor. Script editor is based on KatePart/KTextEditor, a great piece of code from KDE libs used in several KDE softwares like KWrite, Kate, Kile, KDevelop, and more.

The Kate guys released a new feature in KDE 4.13 release: an improved code completion for all languages supported by KTextEditor. It use the same XML file to syntax highlighting from each language to provide this new code completion.

As I coded the default syntax highlighting, the code completion for the script editor was enabled as default too. Amazing!

So, let’s see some pictures about this feature:

code-completion-scilab-cantor

Code completion in Scilab

This figure we use code completion to write a plot command in script editor from Scilab backend.

code-completion-maxima-cantor

Code completion in Maxima

In Maxima backend we can see the code completion working not only to the commands with initial string typed: for example, contour_plot is suggested in the figure.

This new code completion is available to all backends that have the script editor plugin implemented. To use it you just type Ctrl+Space in the editor.

There are some improvements to this feature to be implemented in the future. For example, it would be interesting load the functions to modules/packages imported in the editor – for example, in Python I can use import numpy and the numpy functions could be available in code completion too. The variables in the Cantor workspace could be available in the script editor too.

But it is work to the future. For now, you can have fun with this new code completion., and thanks for all Kate developers for this nice feature!

KDE packagers: give some love to Cantor

python2_select

I have some posts to write about Cantor but first I would like to request a help to KDE packagers of several Linux distros around the world.

I received some mails from users asking “how can I use python in Cantor?” or “where is python support in Cantor?”. Well, python2-backend is available in Cantor since KDE 4.12 release. If you is using KDE >= 4.12 but you can not to use python in Cantor, maybe the package was not build correctly.

python 2 development library (commonly packed as python-devel in some Linux distros) is required to build python2-backend. python 2 is required to use Cantor with python 2.

Then if you are a Cantor user and can not to use Cantor with python, please write a bug report in the bug management system of your distro. You can to put a link in the bug report to this post too.

Anyway, if your distro bring or not bring python2-backend, write a comment below and I will make a table with this information.

[UPDATE May 13, 2014] – In FISL I and Paulo Andrade, a Mandriva/Conectiva employer, noticed that Cantor is missing the Python backend in Fedora. Paulo wrote a bug report and the packager fix it. Maybe in one week the Cantor with the fix will be available in Fedora repositories. Thanks Paulo!

See you at FISL 15!

banner-426x121_B

Soon I am going to one of the biggest events in the world about free software, the International Free Software Forum (FISL)!

As usual this year will be very present in KDE activities – especially the lecture by Kévin Ottens on KDE Frameworks 5, and the KDE community meeting. It will be easy to find me on the KDE booth in the user group area too.

I intent to attend other lectures, for example the metamodeling using Qt with Sandro, the 30-year history of GNU with Aracele, devices for neuroscience studies with Cabelo, and some more - I’m still far from decided “my” FISL schedule.

May 9, 16:00h, I will present a paper on Free Software Workshop about the development of Python backend for Cantor.

The complete schedule of FISL activities has more than 300 lectures, workshops, short courses, and more!

See you there!