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.

How to Get the Attention of an Open Source Software Investor

How to Get the Attention of an Open Source Software Investor

On the Hacking Open Source Business podcast, Joseph Jacks aka JJ (Founder, OSS Capital) joins Avi Press (Founder and CEO, Scarf) and Matt Yonkovit (The HOSS, Scarf) to share what you need to know before starting a commercial open source software (COSS) company and how you can set yourself and your project apart in a way that attracts investor funding. As an investor who exclusively focuses on open source startups, JJ provides a VC perspective on what he looks for when evaluating investment opportunities.
Heroic Labs' Journey to Open Source and 5.3M Docker Downloads

Heroic Labs' Journey to Open Source and 5.3M Docker Downloads

On The Hacking Open Source Business podcast, CEO Chris Molozian and Head of Developer Relations Gabriel Pene at Heroic Labs elaborate on their usage and shift to open source and how it accelerated their adoption.
How to Keep Open Source Projects Open Source

How to Keep Open Source Projects Open Source

In this recap of the first episode of the Hacking Open Source Business Podcast, co-hosts Matt Yonkovit and Avi Press, Scarf Founder and CEO, dig into a recent controversy that highlights the challenges open source projects face trying to create sustainable revenue streams to support a business or a non-profit that funds the project’s growth.