Scarf Tech Stack: Relude

Published

May 25, 2022

This article was originally posted on

Hackernoon

Motivation

At Scarf we love highlighting and using awesome open source projects. This blog post will talk about Relude, a project we use in the majority of our Scarf tech stack. For more information on the overall architecture we use to develop Scarf see our previous Scarf Tech Stack post.

What is Relude?

At Scarf we write functional programming in Haskell. Relude is one alternative to Prelude, a standard module, in Haskell. It is widely known as a safe, performant, and user-friendly Haskell standard library.

Their ReadMe details all the reasons why other developers might choose Relude for their tech stack. In this post we will talk about why and how Scarf uses it.

Why Relude?

Using and adopting a new library can be difficult. Often projects lack proper documentation. Fortunately, Relude has extensive documentation that is beginner friendly.
The Relude community is also inviting and works to keep good communication between their maintainers and users.

The community put a lot of effort into their content, including helpful blog posts by the maintainers on their site, Kowainik.
Other reasons we use Relude include:

  • The library offers type-safety and function totality.
  • It is performant with a preference for {% c-line %}Text{% c-line-end %}, a more efficient alternative to Haskell's standard {% c-line %}String{% c-line-end %}.
  • It provides convenience by bringing commonly used types and functions into scope, and making available functions easier to use.
  • It is minimal with a low number of dependencies.

How Scarf uses Relude

Relude is used in a majority of our codebase, including the main app server we use for our website, `scarf-server`, our data processing pipeline, and beyond.

We made the decision to use Relude as our base library instead of the default Haskell base library because it has good defaults that cue users when they are using unsafe functions. This is important because the default library doesn’t flag the unsafe functions which can lead to runtime errors.

Learn More

To learn more about Relude:

Do you know what companies are using your open source project? Learn more about how Scarf can help you see a project’s impact, identify potential customers, and understand growth without sacrificing your end-user’s privacy:

Latest blog posts

Tools and strategies modern teams need to help their companies grow.

Scarf Newsletter - May 2023

Scarf Newsletter - May 2023

Stay up to date with the latest updates from Scarf. Discover upcoming features, industry news, partnerships, and events. May 2023 Newsletter.
Harnessing Software Download Patterns: Using Open Source Download Metrics to Uncover New Users and Potential Customers

Harnessing Software Download Patterns: Using Open Source Download Metrics to Uncover New Users and Potential Customers

Here at Scarf, we've developed a solution to help open source projects and businesses gain more insight into their users and their download traffic - Scarf Gateway. Here's how it works.
Unlocking Growth Potential: Scarf Users Benefit from Clearbit Integration for Improved User Intelligence

Unlocking Growth Potential: Scarf Users Benefit from Clearbit Integration for Improved User Intelligence

We are thrilled to announce our latest partnership with Clearbit (https://clearbit.com/). This collaboration will offer Scarf users and customers an enriched array of data about their user base, significantly enhancing the quality of information you already value from Scarf.