Hasura migrating to Rust?

I would like to counter the gloom of this thread with a happy tale of conversion.

My work codebase was 100% Python until a few months ago, for the usual reasons:

  1. There is a large pool of Python developers;
  2. Python is easy to get started, so it feels productive at first;
  3. There is a large ecosystem of third-party libraries ( e.g. how many programming languages have a large weather science toolkit available ?

But of course, slowly, cracks in the foundation appeared. Python is slow for most things. People started dreading refactorings. Surprise “one-off” bugs in production due to a sentinel None happen at least once a week. All of this has contributed in limiting our technical velocity as the business scales.

After some experimentation, we’ve started using Haskell for a new key area where we want to grow, and our results are simply stellar. This area plays into Haskell’s strengths:

  1. Refactoring is a breeze, which has made us bolder. This is a huge plus for a startup;
  2. Parallel performance is unmatched, especially given that I put very little effort in it. We’ve been able to tackle problems at a scale we would never have touched before;
  3. The single-threaded performance bump has allowed us to re-wire our brain and express ourselves better, instead of trying to fit everything in a numpy and pandas context;
  4. An architecture based on monad transformers has made it possible to run the same code in separate contexts (e.g. experimentation vs production) in ways which has been a pain in our previous Python efforts;
  5. No sentinel None has crashed our system yet, which I’m very happy about :wink:

Sure we bumped against a nasty memory leak once, but to be fair I was being silly (import Data.Map as Strict instead of import Data.Map.Strict as Strict).

Overall I would say that there are many good reasons for a start-up to use Haskell, as long as the tradeoffs match the use-case.

35 Likes