Sugar Learning Tools – Part III

Catching up

The last couple of months have been hectic: more Sugar applications with Flatpak, quality of life improvements to Flatseal, tinkered with the idea of a Flathub-based OS for phones, showed case the tools to create modern native applications with JavaScript, shared my views on how Flatpak is reshaping the desktop’s future, teased the GNOME Circle at the Linux App Summit, planted the initial seeds to kickstart the GNOME community in my home country, started contributing to Flathub’s backend and other non-desktop projects (oh, yeah, and then my actual job 😂).

For this post though, I would like to focus on the progress made to Sugar applications with Flatpak.

Sugar Learning Tools

During my GUADEC presentation I mentioned the things I wanted to achieve moving forward with this project. Primarily, improving the documentation and porting guide to ensure that this project can scale and, of course, port more art-oriented applications.

For improving the documentation, I ported Sugar’s official “hello world” and re-wrote the porting guide based on this application. By using this minimal application as an example, it becomes much easier to highlight the key porting steps and concepts. I also took the opportunity to update the application itself to the latest version of the Sugar toolkit.

As for porting new applications, I didn’t get to port as many art-oriented applications as I wished. Mostly due to the fact that most of those are still using GTK2 and Python2, so it would require more time I can afford at the moment. Nevertheless, I ported some pretty awesome ones.

Paint is a playful painting application. It provides all the classic tools a young learner would expect, e.g. brushes, shapes, text, transformations, adding images, etc. Plus, it can enable sounds to make the experience extra funny.

Pukllanapac is a Rubik’s Cube-like game. The objective is for the learner to exercise their problem solving skills. The application has different patterns for circles, triangles, and hexagons.

Solar System is an interactive visualization. The goal is encourage the learner to know more about the planets and their moons. In words of the original developer of this application (@cvgarciarea) :

It is my hope that this tool serves as a practical and interactive way to explore astronomy.

It’s worth noticing that he was one of the early young Sugar hackers that showed up, when the Uruguayan government introduced OLPC nation wide.

Swift Feet provides a series of entertaining physical activities. It encourages  the learner to stay active. Includes exercises and dances. This application was originally designed for OLPC Canada in collaboration with ParticipACTION Canada and Ophea organizations.

Sugar Chess is a friendlier front-end for gnuchess. Its features go beyond and above other popular chess applications, e.g. allows the learner to customize the graphics, replay matches, use different modes, and more.

Moving forward

There’re still plenty of applications that need to be ported but, for the time being, I need to find a better way to monitor these twenty five applications that were ported so far.

I have discussed the idea of a developer Dashboard with Flathub’s maintainers but, for the short term, I might end up hacking something quick for my own needs.

Another imminent task is to update the BaseApp and all applications to the latest GNOME runtime, but this should be trivial. If anyone is interested in learning about packaging applications with Flatpak this task could be good a opportunity, so feel free to contact me!

 

Sugar Learning Tools – Part II

It’s been many months since my visit to Barcelona and the Linux App Summit. Since then, I got unexpectedly distracted by another project , started a new job and, well, COVID-19 happened.

But, even before all that, a lot of progress was made to bring Sugar applications to the desktop with Flatpak and Flathub. I thought it would be worth sharing the progress.

Here’s a quick summary:

  • Twenty applications were ported, with the help of Google Code-In students, and are now available on Flathub.
  • Identified the most common issues of running these applications outside of Sugar. Many of those issues are handled nicely by Sugarapp now.
  • Made several upstream contributions, which also benefits other Sugar Labs community efforts.
  • The process of porting applications is decently documented.
  • Started making these Flatpak bundles easier to maintain.
  • Nowhere near to support collaboration yet.

Here’s an overview of these applications:

Abacus it quite self explanatory. What’s remarkable about this application, is that it includes a tool to build a custom abacus. Fun fact, many years ago, it was used by teachers from Caacupé – Paraguay, to build their own abacus to handle fractions. The Caacupé abacus has been part of this application since then.

Chart is a simple tool to visualize data. What’s nice about this application is that the learner can take data from other Sugar applications and visualize it. Works with the most classic visual representations.

ColorDeducto is not the typical learning tool. It’s a challenging game about recognizing patterns and developing inductive logic.  Something cool about this application is that the learner can create custom patterns using Python. The application was ported by our all-star Google Code-In winner Srevin Saju.Dimensions is a fun pattern-matching game. The learner can compete against an AI, and it can be quite challenging as categories, difficulty levels and timers start mixing .

Finance is an interesting take on learning by doing. This application can help the learners to manage a real budget, and use basic home-finance concepts while they’re at it. Another awesome port by Srevin, by the way.

FotoToon lets the learner create their own comics. It’s simple and fun.  These comics can be saved to many formats, including video. A popular choice nowadays, with everyone spamming memes at each other, haha.

What to say about FractionBounce, learn the concepts of fractions and percentages while kicking a football? It can never go wrong. Yet another port from Srevin.

Implode is a tetris-like game. Dear learner, watch out for this application, it’s quite entertaining. Don’t let anyone try it on your computer, they might not give it back for a while, hah.

Maze is a simple game but, activate these mines, turn off back tracking and go crazy with that difficulty button. It will blow anyone’s mind. This application was ported by Marcus Chong, another brilliant student and one of our runner up winners.

We are half way through the list, so let’s take a little breath and remind you that if you don’t have high school students contributing to your project, you’re really missing out.

Alright, let’s continue.

Measure is one of my personal favorites. This application bridges the real world and the digital world. The learner can visualize their own voice, tune instruments, and record and export that data to visualize it with the Chart application.

Memorize is more than just a pair-finding game, it’s a tool to create these games. Learners can mix sounds, images, text, text to speech and send these games to their friends.

Another personal favorite, Music Keyboard. Simply put, converts the learners computers into more than thirty instruments. They can record and share their masterpieces. Fun fact, my 4 year old nephews approved it, very loudly.

Physics is the perfect example of playful learning. It’s simply a physics sandbox. Learners can create structures, machines and simulations. Of course, they can also watch it all crumble, hah.

I suppose is no surprise that Pippy is my personal absolute favorite. Lets the learners write and run Python scripts in a surprisingly simple way. It comes packed with tutorials for writing Python games, physics simulations, and even GTK applications.

ReadETexts does many things. Helps the learner find books from a freely-available catalog of thousands of books. It downloads the books and it can even read them with a delightful robotic voice, hah. Works with dozens of languages. Another application ported with the help of Srevin.

It can’t never hurt to have a slipstick calculator available right? hah. I think it’s a great example of many other Sugar applications, tiny curiosity-driven tools. Sliderule is another port from Marcus.

Speak is another personal favorite. It engages the learner to write and read, while conversing with Alice, a bot with a particular sense of humor. It works in many different languages.

Story is probably one of most lovely applications I ported.  The premise is quite simple, it randomly generates a sequence of images and asks the learner to create a story that connect these images. They can record their voices or use text.

Turtle in a Pond is a gem in disguise. At first sight is simply a game about trying to catch a turtle before it runs away. The real fun though, is when the learner realizes that is possible to write Python code to make the turtle smarter.

Words is a simple, yet powerful, dictionary. Doesn’t require internet access. It can read the words and their definitions with its robotic voice. Works in many different languages.

That’s it!

The focus of this project will move onto making these Flatpak bundles more easily maintainable, for now. I am working on a BaseApp for that purpose, and will soon start updating each of these applications.

If someone is interested in any of the topics I discussed here, or just wants to contribute to this project, contact me via the GNOME Rocket chat. I can help you get started. There’s a lot of work to do!

Finally, I want thank everyone who contributed to this project during these months. Special thanks to Srevin Saju, Marcus Chong (and all our Google Code-In students), Bilal Elmoussaoui, Bartłomiej Piotrowski, Nick Richards (and all other Flathub admins who helped me with the reviews), and Jorge García Oncins for all the early testing and feedback.

Linux App Summit 2019 and Sugar Learning Tools

Last week I traveled to Barcelona, Spain to attend the Linux App Summit. For the first time, GNOME and KDE co-hosted this event to bring together everyone involved in the Linux application ecosystem. The summit was packed with a diverse audience from all over the desktop community and the world. Being there and being part of what is coming for the future of this ecosystem was truly an enriching and motivating experience.

The always-wonderful group photo

Equally important, I was able to meet with former colleagues and friends from Endless, and from the GNOME community. I made many new friends as well. All of this is certainly priceless for someone living far, far away. If you want to know more details about what happened during the summit, I highly recommend reading blog posts like the ones from Julita Inca, Daniel Garcia Moreno, Nick Richards and others. The social media coverage was superb, so check their twitter and youtube channels as well.

During the summit, I had the opportunity to present a lightning-talk titled Flooding the desktop with great learning tools. In this blog post, I will try to expand just a bit more on the details of this project. TL;DR I am making Sugar applications available to all desktops and Linux distributions using Flatpak and Flathub. But first a bit of context.

That is me making the most out of my precious five minutes. Thanks to Matthias Clasen for the encouragement and this picture.

Sugar is a unique desktop and a set of applications for Linux. It was designed for children to learn while having fun. It is Free and Open Source Software. Sugar Labs is a community of volunteers who maintains the project until this day. Since its original release, as part of the One Laptop Per Child project, dozens of educators and developers have created hundreds of great learning tools, most of which are only available for this platform.

Flatpak is a next-generation technology for building, distributing and safely running applications on Linux. It allows developers to build their applications once, and ensures that it will run properly on any Linux distribution. Beyond its technical marvels, it is a game-changing technology that will bring developers and users closer than ever before. Flathub is a community-driven hub for distributing and downloading applications powered by Flatpak. Both Flatpak and Flathub are Free and Open Source Software, as well.

I have spent many years working on desktop technologies in education and access to information, including the Sugar desktop and Endless OS. So the idea of putting Sugar and Flatpak together started a few years ago, while I was working at Endless, one of the early-adopters of Flatpak.

Sugar homepage screenshot
The Sugar desktop with a custom background image

It was easy to see that this is a clear win-win situation. Sugar has many unique learning tools that do not exist on the desktop, and Flatpak has the potential to reach new desktop users.

But, how does this project differ from the Sugar applications already available through package managers? Depending on your Linux distribution, you could technically install a small selection of these applications today. But there are two big caveats. First, you will need to install the Sugar desktop or at least some of its system services just so they can run. Second, and most important, you won’t be able to do much with these applications unless you are doing it within Sugar. These applications depend heavily on the Sugar paradigms and APIs, which are quite different from desktops like GNOME or KDE.

As an example, Sugar users don’t need to deal with file system directly, instead they use something called the Journal, which is not available outside Sugar. But they certainly need to deal with the file system in the desktop.

So, to combine both worlds, I created a small library that makes it easier to port these applications to the desktop. It provides the basic building blocks needed for the job, like:

  • A base desktop application that acts as a middle man between the desktop and the Sugar application.
  • A set of compatibility UI components that can be used as a replacement for Sugar-specific components.
  • A set of utilities to generate the metadata needed for a desktop application, basically, the appdata.xml, .desktop and mimetypes.xml files.

With the help of this library, porting applications is surprisingly easy. In most cases, the changes result in small patches that are easily maintainable downstream. Of course, this simple approach has its downsides. As an example, collaboration is disabled since there is no Sugar collaboration service, nor is mimicked by the library.

Once the application is ported, it can be packaged as any other desktop application with Flatpak and published on Flathub. I already ported a few of my favorite applications, two of which are already published on Flathub. My plan is to port as many applications as possible with the help of Google Code-in students this winter.

Abacus now available on Flathub
Music Keyboard now available on Flathub

If you find this project interesting and want to contribute, feel free to contact me!

Last but not least, special thanks to Nick Richards, a former colleague at Endless and Flathub admin, for his early review of this work during the summit, and to Javier Martinez Canillas and his family for hosting me during that week in Barcelona.