A conversation with Outreachy student Sonja Heinze about Fractal

Sonja Heinze was an Outreachy intern for GNOME from December 2019 – March 2020. She worked on Fractal, GNOME’s Matrix client. She was interviewed by Oliver Propst during her internship.

Do you want to introduce yourself?

I’m a mathematician and have just finished a PhD in algebraic singularity theory. Last year, I went to a place called Recurse Center for three months with the idea to figure out if programming would be a fun alternative to an academic career.

Can you tell us about the work you’re doing?

At the moment, I’m implementing a video player in Fractal. Fractal is a communication app for the GNOME desktop based on the Matrix protocol. Communication is organized into rooms. With my contribution, video attachments get handled as follows: any message with video attachment that appears in the room history (i.e. list of messages sent in that room), gets provided some own little space where it gets auto-played in a loop without sound.

Of course, when the user scrolls up or down in the room history and the video message gets out of sight, it stops playing. When clicking on the video, the media viewer opens. There, the user can play and pause the video and seek in it (see second picture in mail attachment). Furthermore, in the media viewer the user can go forth and back through all the media sent in that room (i.e., images and videos). Both, in the room history and in the media viewer, the video widget dimensions get adjusted well according to the video resolution ratio.

Why did you choose this project?

The project seemed the most interesting and challenging one on the Outreachy list. For me, learning through the internship is just as important as starting to get to know the open source world. I hadn’t seen GTK or GStreamer before and reading about them seemed very interesting. Furthermore, Fractal is written in Rust.

I hadn’t seen any code written in Rust before, but Rust had already caught my attention during my time at the Recurse Center. I guess, if the project was written in a very common language that I didn’t know, I wouldn’t have chosen that project. But for a newish language like Rust, it seemed more acceptable and learning Rust through the project was a motivating idea. Also, contributing to a non-commercial open source communication app alternative to the mainstream ones was another mo titivating factor.

How would you rate the development experience?

It has taken me a little while to get used to the general work flow programmers are used to; as in, when to ask in a private chat, when in a public chat, when on GitLab and, if on GitLab, where. I find GitLab very user friendly. Also, whenever I don’t know about a functionality that’d be useful, my project mentors tell me about it. And whenever I know about one, but don’t know how it works, the documentation is very useful.

What are your impressions about the GNOME community and how do you feel about contributing to GNOME in general?

My two mentors for the project are super nice and helpful. And the other community members I’ve interacted with so far, are so as well. I haven’t interacted with that many people yet, though. Contributing to GNOME is cool. I see GNOME as part of a non-commercial open source alternative to Windows or Mac and contributing to that is, for sure, worth the while.

Your work on Fractal involves using GStreamer can you and tell us something about GStreamer?

GStreamer is a library used for media reproduction. In Fractal, GStreamer was already used for the implementation of the audio player that appears for messages with audio attachment in the room message history.

GStreamer reproduces audio or video by means of a pipeline, i.e. a system of connecting pieces, called elements, that manipulate the media in one way or another. In Fractal, we use a high level API provided by GStreamer for that called GstPlayer. In the end, I’ve been able to do almost everything through GstPlayer. But on my way there, I’ve sometimes manipulated the pipeline directly and through that I’ve learned a little bit about how GStreamer works. 

For example, I’ve read a little about how communication with and inside the pipeline works. The way a pipeline communicates internally is by sending events from one element to another. There are different kinds of events. Some of them are responsible for informing all pieces of the pipeline about an instruction that might come from outside the pipeline. 

An example is wanting to access a certain point of the video and playing the video from there, called seek event. For that to happen, the application can send a seek event to the pipeline; that’s one way of communicating with the pipeline from outside. When that happens, that seek event is put on all sink elements of the pipeline and from there sent upstream, element by element, until it reaches the source element, which then pulls the requested data and sends it through the pipeline. 

Events are just one example of pipeline communication. To mention some more ways to communicate with the pipeline from outside: messages the pipeline leaves on the pipeline bus for the application to listen to, state changes and queries on elements or pads.

Anything else you want to add or share?

Fractal uses Flatpak, which provides isolation of the app from the rest of the user’s system. I didn’t know Flatpak before and the concept seems pretty interesting. I hope to find some time to learn a bit about it soon.

We want to thank Sonja for taking time talking with us about Fractal and the work she’s done. More information about Fractal is available on the GNOME wiki.

Meet Matthias Clasen

Matthias Clasen is enjoys spending time outdoors, having great hair, and working on GNOME Tool Kit (GTK).

A photo of Matthias Clasen. He has short blue hair and is standing amongst trees.

What is your role within the GNOME community?

I have been involved GNOME for a long time. My first commits to GTK are from sometime around 2002. GTK is where I spend most of my development and project maintenance time. But I’ve been involved in many other parts of GNOME at one point or another, from GLib to GNOME Software.
Apart from writing code and fixing bugs, I am a member of the release team, and do a few of the GNOME releases every cycle. In recent years, I’ve often done the .0 stable releases.

Other affiliations you want to share?

In my day job, I manage the “GNOME” part of the Red Hat desktop team, which is an outstanding group of engineers. We juggle upstream work on GNOME and related projects with maintaining the workstation products in Red Hat Enterprise Linux and Fedora.

Why did you get involved in GNOME?

That is a tough question to answer — these things usually just happen, and we try to retroactively make sense of them. To give some answer: My first love in software was typography — I spent my university years in Germany happily doing math and TeX. At some point, I got interested in window managers, and trying to write a better menu system for fvwm is what created my first contact with GTK. And things just grew from there, with many lucky coincidences along the way, not the least of which was that I got a job in the Red Hat desktop team.

Why are you still involved with GNOME?

On the one hand, it is part of my job (and I am extremely lucky that it is). But, really, it is just a way of life. There are so many good friends and colleagues in the GNOME community that I can’t imagine not being involved in it anymore.

What are you working on right now?

It is always a mix of things that are going on at the same time. The big tasks are getting Fedora Silverblue ready for prime time and trying to push GTK4 over the finish line. But there are a whole lot of smaller things that take up some of my time. A few weeks ago, I took a day to write a Flatpak portal that lets applications update themselves. And last week I spent a day working with Behdad on pango (I still have a soft spot for typography) and wrote a post about it.

What are you excited about right now — either in GNOME or free and
open source software in general?

I am feeling quite positive about Flatpak, and the opportunities it opens up for getting out of the “Linux distro” conversation. It is exciting to see many apps on flathub that I had no idea existed. And now it is just one click for me to try them out. Together with gitlab and its CI, flatpak has also changed the way we develop GNOME. It is like night and day, compared to a few years ago — things generally just build and work these day, and you can download flatpaks to try out branches — it is fantastic.

What is a major challenge you see for the future of GNOME?

I think it is a challenge to teach generations the value of having a local computing device (e.g. your laptop) that is powerful and accessible enough to let you explore and build things. Between phones and the online world, there is a risk that we lose that important aspect of the freedom to tinker an explore — you don’t compile things on your phone, and you can’t reboot the cloud…

What do you think GNOME should focus on next?

I have a hard time answering this, because GNOME is thousands of individuals, who all have their own motivations and goals, not a monolithic block that can be turned in a different direction with a quick command. I think the work Endless has been doing for bringing computers (and GNOME) to people in the developing world and to young people is very relevant for the long-term future of the project, and we should support them.

What should we have asked you about that we didn‘t?

You could have asked me about my kids and my cats.

My kids are 21 and 19, and in college. Thankfully, they are both at home for the summer, so we can share the cooking and do some hiking and kayaking together.

The cats are not in college.

A bright red leaf on the stony grey ground.
A lovely leaf Matthias found while hiking in the White Mountains.

This interview has been edited for clarity.