Our first post about 10 open-source projects for beginners was welcomed by our readers. Now, we present you with something a little bit more nerdy.
In this post, we would like to provide our developers’ view on the best projects written in Haskell that they use regularly, in some cases — daily.
Best Haskell open-source projects to use every day
This is a classic, a Haskell project with significant impact and wide usage.
Pandoc is a free Haskell library that converts text from one format to another. Here are just some of the formats that this library supports: commonmark, docx, epub, fb2, gfm and so on.
It also features a powerful and simple way to do everything a text processor can do by just writing plain text. It’s called Pandoc-flavored Markdown and it’s amazing.
Now you know what all those “convert PDF into DOCX online without registration and SMS” websites use under the hood!
XMonad is a tiling window manager. What does it mean?
To ensure optimal UX, in 1981 Xerox came up with the notion of tiling application windows. This means that the window manager arranges windows automatically in such a way that they don’t overlap! Sadly, like many powerful arts, this art was forgotten by mainstream users (up until recently).
XMonad is one of the best tiling window managers out there. While it has very good defaults, it can also be customized to your heart’s content. Furthermore, it’s minimalistic, easy to use, and “haskell + smart programming practices guarantee a crash-free experience”.
There are a bunch of launchers on Linux, but the fastest, leanest and meanest is dmenu-run. Unfortunately, it is also not that wise, it just searches for an application based on the string you provided. Therefore, we use this application that wraps dmenu and enables fuzzy search.
To give an example: Let’s say you are an ebook fan. If you type
ca, it predicts that you want to read a book using
calibre. When you just invoke the launcher, it knows that you likely want to do things like turn on the browser or movie player, or tweak the sound settings. You don't need to think, it reads your mind. And yes, it's written in Haskell.
If you’re into pretty stuff, you might want to have a more graphical launcher. Well, as a matter of fact, we (yeah, literally “we”) got you covered. For the price of 5MiB of RAM and an additional 20MiB operational footprint, you can get a launcher with configurable hotkeys called “Lambda-launcher”.
It’s made by one of our employees and it’s very extendible and configurable. Inspired by Albert launcher, it’s probably the best compromise between the speed of operation and the speed of use.
If you are a fan of the quantified self movement like some of our employees, tracking time for various tasks done at the computer can be an annoying process. How to make it easier? With Haskell of course.
Straight out of my software toplist, arbtt is an amazing cross-platform time tracker that automatically records data about your activities and writes it into an encrypted file. Later on, you can query and analyze your data. Since it’s cross-platform, you can cover most of your laptop and desktop computers, no matter whether they are running Linux, macOS, or even Windows.
Taffybar is a Haskell-written window manager bar for desktops. Its coolest feature is integration of advanced set of widgets that a programmer can use to quickly and easily visualize data. If you use the config file (~.configtaffybar/taffybar.hs), you can tailor the default widget bar to your own exquisite taste. We must say that the program is pretty similar to xmobar but we put it before anything else because of a better widget set to which you can as well contribute.
Taffybar creates widgets using GTK and Cairo. This means that you don’t have to get extra work done if you want nicely looking and quick rendering charts. Mind that taffybar is a library that you have to install alongside with a Haskell compiler (GHC) if you want to create tailor-made executable files.
If you think that Haskell is an obscure language, think twice. Haskell is probably more intuitively clear for children who know only the basics of maths than for Python- or, God forbid, Java-experienced developers.
The language that really is obscure to the point it becomes unsafe and that is extremely overused is standard Shell scripting language. Three people in the world who know how to write idiomatic code in shell got together and wrote a brilliant tool that checks if your scripts are idiomatic. They even have a gallery of bad code.
If you don’t want your Shell scripts to end up there, use ShellCheck for every shell script you intend to run more than once!
With git-annex you can work even with such large volumes of data, that do not open in GitHub. How does it happen? With git-annex, you track filenames and metadata instead of content, leaving content in more convenient places: drives, cloud, etc.
Git-annex lets you support the resources, manage the intentional and unintentional copies of files and keep control of the versions. It saves the files you need while you’re working in offline mode on the local device. During the next connection to the remote server, all the data will synchronize, saving space on your gadget and keeping the routes to all the files.
For an extensive introduction and description of use cases, check out this video.
Here is an example of a git-annex repo you might find interesting: ocharles repository of CS papers.
Why did they use Haskell for writing git-annex? From what git-annex is not: “git-annex is not some flaky script that was quickly thrown together. We wrote it in Haskell because we wanted it to be solid and to compile down to a binary.”
Tired of writing ugly stateful UIs? Use Gi-gtk-declarative library to make other stuff. It was used to make Lambda-launcher, for instance.
Declarative markups save your time and nerves when you develop the user interfaces. UI created in Haskell with Gi-gtk-declarative package are easily validated by the HTML standards, well recognized by “virtual DOM” and enabled by technologies like Electron.
Gi-gtk-declarative package is a bit raw now for the commercial usage, but it’s functionality is head-spinning, so we fix our attention on this project’s future steps in extending the haskell-gi family.
At Serokell, we write quite a bit of Nix code. But here we won’t be convincing you that you need to use Nix for all your building needs, even though it is true.
If you already know about and use Nix, though, we have created an opinionated formatter for Nix code. Feel free to try it out or contribute.
If you want to learn more about the formatter and our design choices, you can watch Lars’ talk from NixCon.
Do you agree with this version of the coolest open-source Haskell programs for Linux or you’d rather prefer our previous collection? Have something to contribute? Feel free to hit up @Serokell on Twitter and share your thoughts with us!
Originally published at https://serokell.io.