DEV Community

Matthew D. Miller
Matthew D. Miller

Posted on • Updated on • Originally published at blog.matthewdmiller.net

Vala Deserves a Closer Look

This is not really a post about Vala--though I do think Vala deserves a closer look. It is about the general philosophy of evaluating programming languages. I also wrote a post that's not really about Perl.

There are so many programming languages out there that it's difficult to determine which are worth my attention. I've recently started looking for a new language to learn in an effort to continue expanding my tool set. I have an ever growing list of programming languages I would like to learn someday. One language that was not on that list was Vala.

I had dismissed Vala as a GNOME thing with little interest to those outside the GNOME community, but recently I had seen Vala pop up in a few unexpected places, so I decided to give it a closer look.

One of the ways I evaluate a programming language is to see what cool projects are being built with it. The way I do this is by going to GitHub's trending page and selecting the language from the Languages drop-down on the right.

If all I find is the language interpreter/compiler, a web application framework, and a few assorted libraries, I'm not usually going to spend much time on that language. I'm interested in languages that people are using to build cool things. Every language (no matter how obscure) seems to have at least one web application framework these days. The trending page for Crystal this month shows no fewer than four web frameworks: Amber, Amethyst, Kemal, and Lucky. Forth has 1991. Nim has Jester. Smalltalk has Seaside.

Nor do I really care that much about module counts. Your language may have four different libraries to parse JSON and multiple ORMs, but what I want to know is what are people building with those libraries. If people are building cool projects with a language, I think a strong ecosystem and useful libraries will follow.

I realize GitHub might not host all the cool things being done in a language, but I feel it is representative. Maybe cool things are being done in a language but they are proprietary. If a language is fun to use, I think it will be used for both proprietary and open source projects, so I think open source projects sufficient to judge a language. There could also be cool projects on SourceForge, GitLab, etc. For now, GitHub has by far the largest collection of open source projects, so it serves to give a pretty good survey of what is available in a given language.

The Part about Vala

I guess since I do have Vala in the title, I should share some of the cool projects being built with Vala that convinced me to give it a closer look.

  • Akira. This is a UI/UX design tool for creating UI mock-ups. It hasn't even had a stable release yet, and it already has 1,526 stars on GitHub and $560/month pledged on Patreon. It has a really cool mascot too. The lead developer also has a SQL client and FTP client written in Vala.

  • Birdfont. Font editor. Many Linux distro's have packages in their repos, and there is a package in OpenBSD. There are also binaries for Windows and Mac. This project is evidence that Vala is not limited to GNOME. I also found it funny that GitHub thinks 11.3% of the source is written in Brainfuck because of the .bf extension used for fonts in the Birdfont format.

  • Peek. GIF screen recorder. Packaged for a lot of distros. Could be useful for creating animated screenshots for READMEs.

  • pdfpc. Presenter console with multi-monitor support for PDF files. Vala must be easy to learn or there are a lot of developers who already know it, because some of these projects are able to draw a lot of contributors. This project has 43 contributors with the latest commit 19 days ago.

  • Timeshift. System restore tool for Linux. This is another Vala project with a small but active community. It has 30 contributors and users submitting issues and pull requests.

  • Final Term. This was a terminal emulator with advanced features. It's no longer maintained, but it was very popular (it has 3,999 stars on GitHub).

  • Most of the default apps in elementary OS are written in Vala. I haven't used it (I won't give up my MATE desktop), but elementary OS is a popular Linux distro (currently #4 on DistroWatch). It's app store, audio player, calculator, calendar, email client, file manager, image viewer, panel, screenshot tool, terminal emulator, text editor, video player, and even it's window manager are all written in Vala. I question the necessity of needing to write so many of their own apps when there are already so many great options available for many of these, but they do have a consistent design aesthetic and ecosystem. Many third party apps written for elementary OS (but working with other distros) are also written in Vala (such as this eBook reader and focused writing app).

  • Deepin is a popular Linux distro in China with it's own desktop environment. Unlike elementary OS which uses GTK, it uses Qt, yet it still employs Vala for a couple things. It's terminal emulator and it's window manager (which started out as a fork of the elementary OS window manager) are both written in Vala.

  • There are some official GNOME apps written in Vala, but surprisingly, since Vala is a GNOME project, not very many. The GNOME disk usage analyzer, backup tool, and photo manager are written in Vala.

  • There's even a web application framework written in Vala.

Vala may not have developers who "rewrite all the things" like Rust or the backing of a tech giant like Go and Reason. I've been averaging a new programming language every seven years, so this is a big decision. I'm taking my time. I'm considering making Rust or D my next language, but now I'm also considering Vala.

Top comments (16)

Collapse
 
alecaddd profile image
Alex🔥

Hey, I'm the author of Akira and the other apps you mentioned, thank you so much :D
Regarding Vala, I can tell you from personal experience that it was really easy to learn. I have a background in web development heavily focused on PHP, and when I decided to play with some native Linux applications, it was really hard to even understand the basics of Qt or C++.
Vala was a breath of fresh air. A really clean language, way less verbose compared to others, and with a decent introductory documentation thanks to the elementary OS community.
Cheers

Collapse
 
goober99 profile image
Matthew D. Miller

It's awesome that you're building cool things with Vala! I'm thinking of starting a series on this blog of interviews with maintainers of open source projects (sort of like Coders at Work). Would you be willing to be interviewed for the series?

Collapse
 
alecaddd profile image
Alex🔥

Absolutely, I'd be honoured!

Collapse
 
frothandjava profile image
Scot McSweeney-Roberts

You might want to consider learning C# first (if you haven't already), seeing as that's what Vala is based on and there are more learning resources out there for C# than Vala. Then learning Vala is just a short jump.

Collapse
 
goober99 profile image
Matthew D. Miller

I had dismissed C# as a Microsoft thing (maybe unfairly as I had dismissed Vala as a GNOME thing). I solely use (and have since 2004) Linux. I haven't touched Windows since XP. At work I develop code that runs on Linux servers and sometimes Solaris servers.

I know there is Mono and .NET Core now, but I have yet to meet a developer who solely or primarily develops on Linux that uses C#. I'm not saying they aren't out there; I just haven't met one yet.

If I was to get into C#, what is the tooling and ecosystem like for Linux? I've been interested in trying to create a mobile app and Xamarin looks like a cool way to do that, but from what I've read, I would need Visual Studio (not that monstrosity known as Visual Studio Code but the actual Visual Studio), which isn't available for Linux.

Collapse
 
frothandjava profile image
Scot McSweeney-Roberts

Core has CLI focused tooling, so it should be fairly comfortable if you've done anything in ruby or JavaScript in the last 10 years.

From what I can tell, Mono as a tool for Linux development is more or less dead (all the focus is on Xamarin and to a lesser extent Blazor/WebAssembly).

It is possible to build a Xamarin app on Linux (at least for Android) with just the command line and a text editor. I keep meaning to write an article about how to do it because it isn't really documented anywhere. The biggest issue (beyond the lack of documentation) is that there's no IDE support for XAML and a lot of the resources for learning Xamarin is centred around XAML and Visual Studio (I'll start to believe that Microsoft ♥️ Linux stuff when they do a Visual Studio branded spin of MonoDevelop for Linux like they've done with the Mac). I've been playing with F# and Fabulous, which sits on top of Xamarin but uses F# to define the UI.

I don't see C# setting the Linux world on fire anytime soon. But I still think it's worth having some knowledge of it if you want to learn Vala seeing as it's the language Vala is based based on.

Thread Thread
 
goober99 profile image
Matthew D. Miller

F# is really appealing to me, but I had never heard of Fabulous. It looks really cool (I'm a fan of functional programming for mobile development). Unfortunately, like most of the .NET ecosystem, there seems to be no easy jumping off point for me. The first step under Getting started is "Install Visual Studio or Visual Studio for Mac and enable both Xamarin and .NET Core support." If you wrote an article on using the command line and a text editor to build a Xamarin app on Linux, I'd read it!

Thread Thread
 
kivikakk profile image
Ashe Connor

Here's a good starting point for C# on Linux -- dotnet.microsoft.com/learn/dotnet/.... I've been doing a bunch of C# under Linux for work lately and it's been surprisingly enjoyable!

Collapse
 
nineh profile image
Nine

I really loved vala, I especially liked declaring properties with get and set methods in one line. But I eventually quit in frustration:

List types are defined three different ways in three different packages (the best ones are in libgee but they're not supported in Gtk) so you can't pass a reference to a libgee list to populate a listview widget (for example).

I kept getting c errors, valac frequently let bugs through to gcc which dutifully printed unintelligible complaints that bore little relation to my vala code: very scary when I was starting out.

I don't know if this is my fault, but I couldn't figure out how to have a static class member containing a list of all instances of the class to have static methods that operated on all instances of the class or considered all instances of the class, I couldn't find an example of this design pattern, and I don't know if it's a limitation of gobject or reference counting, but it made me sad.

Probably going to come back at some point, maybe when Gtk+4 drops.

Collapse
 
gavr123456789 profile image
gavr • Edited

I kept getting c errors, valac frequently let bugs through to gcc which dutifully printed unintelligible complaints that bore little relation to my vala code: very scary when I was starting out.

It looks like you tried Vala for a long time, I assure you now this is no longer there.

Second
What? Like this?
example

Collapse
 
darkoverlordofdata profile image
Bruce Davidson

I like Vala quite a bit. It's easy to write, and compiles to c, so it runs anywhere. Almost. It depends on Gnome's GLib for it's runtime, and GLib is not very portable. My biggest problem with vala is GNome's lack of interest in it. A couple of years ago they even tweeted out not to use vala for any new projects. Too bad - it has a lot of potential, but little support from it's owners.

Collapse
 
gavr123456789 profile image
gavr • Edited

A couple of years ago they even tweeted out not to use vala for any new projects.

One Rust fun not all GNOME dude. There detailed answer from vala dev.

Also here top GNOME repos ordered by language C: 225, Vala: 44 Python: 32, C++: 18. Link

Collapse
 
darkoverlordofdata profile image
Bruce Davidson

Where he says that Vala is not a real programming language? At least the open source community is giving it more love these days - it gives me hope :)

Collapse
 
yawaramin profile image
Yawar Amin

Just fyi, ReasonML doesn't really have Facebook backing, not in the same way that Google is backing Go or Dart, or JetBrains+Google are Kotlin, or even Facebook backed ReactJS or GraphQL. Reason and BuckleScript teams consist of a couple of people working on the JavaScript compiler backend, a couple of people working on the ReasonReact binding, and a handful of people working on build tooling. Because of the way Facebook works, these people are developing Reason mostly while working on their actual projects, like Facebook Messenger.

Collapse
 
kosmospredanie profile image
kosmosp

Vala is a great alternative to C++, with stable ABI!

Collapse
 
gavr123456789 profile image
gavr

In this case, you forgot to add Vala to learning/trying in your profile.