Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
| with builtins; | |
| rec { | |
| pkgs = import <nixpkgs> {}; | |
| testGHC = pkgs.haskellPackages.ghcWithPackages (p: with p; [ | |
| base base-orphans bifunctors comonad contravariant distributive | |
| tagged transformers | |
| ]); |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| module Sand where | |
| import Data.Aeson |
We're stoked you've chosen to join us. If you're successful, you'll be joining a team that is focused on technical excellence and continuous improvement. We take great care to produce well-structured, well-tested, maintainable code. To be successful, you'll need to demonstrate that you do as well.
Our expectations are that this exercise should take you no longer than 4 hours to complete (and hopefully much less). If it takes you much longer than that to get to a working solution, you might not be the right candidate for this role.
- Complete the short version of the Big 5 test and save your results as text.
- Create a new git repository for your code.
- Write a utility that parses the textual results of your test into the following format. Note that you'll need to include your email, which doesn't appear in the output of your Big 5 test. Feel free to use intermediary data structures and useful libraries.
| { pkgs ? import <nixpkgs> {}}: | |
| let | |
| texpkgs = pkgs.texlive.combine { | |
| inherit (pkgs.texlive) scheme-small latexmk; | |
| }; | |
| in | |
| pkgs.stdenv.mkDerivation { | |
| name = "mbd"; |
| -- RHS size: {terms: 254, types: 135, coercions: 0} | |
| Xeno.$wparse [InlPrag=[0]] | |
| :: GHC.Prim.Addr# | |
| -> GHC.ForeignPtr.ForeignPtrContents | |
| -> GHC.Prim.Int# | |
| -> GHC.Prim.Int# | |
| -> () | |
| [GblId, | |
| Arity=4, | |
| Str=DmdType <L,U><L,U><L,U><S,U>, |
| # This expression builds a copy of Twitter Bootstrap CSS but with every rule embedded inside a CSS selector of | |
| # your choice. This makes it easy to embed a Bootstrap-themed component in a site that doesn't use Bootstrap. | |
| # | |
| # Usage | |
| # * Install nix from https://nixos.org/nix/ (it's a fancy package manager that won't mess up your system) | |
| # * Save this file to `scoped-bootstrap.nix` | |
| # * With nix stuff on your PATH, run `nix-build scoped-bootstrap.nix` | |
| # * The result will be in `./result/` (a symlink). Copy to desired location. | |
| # * If you don't want to keep `nix`: `rm -rf /nix` |
| {-# LANGUAGE DeriveFunctor #-} | |
| module Bidi where | |
| -- For 'guard'. | |
| import Control.Monad | |
| -- We use Cofree to represent type-annotated terms. | |
| import Control.Comonad.Cofree | |
| import Data.Functor.Classes | |
| -- We use Fix to represent unannotated terms. | |
| import Data.Functor.Foldable |
Disclaimer 1: Type classes are great but they are not the right tool for every job. Enjoy some balance and balance to your balance.
Disclaimer 2: I should tidy this up but probably won’t.
Disclaimer 3: Yeah called it, better to be realistic.
Type classes are a language of their own, this is an attempt to document features and give a name to them.
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE FunctionalDependencies #-} | |
| {-# LANGUAGE KindSignatures #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeSynonymInstances #-} |