Skip to content

Instantly share code, notes, and snippets.

@mewmew
mewmew / ll.bnf
Last active January 16, 2024 15:38
A BNF grammar for LLVM IR assembly
// ### [ Lexical part ] ########################################################
_ascii_letter_upper
: 'A' - 'Z'
;
_ascii_letter_lower
: 'a' - 'z'
;
@HiImJulien
HiImJulien / Swift Meets CCxx.md
Last active March 30, 2024 19:00
This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.

Swift Meets C/C++

This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.


Analytics

In this example we're going to invoke a function called say_hello, which, as the name already suggests, prints "Hello, World!" to the terminal.

@ezalejski
ezalejski / keybase+git-crypt.md
Created February 2, 2018 16:28 — forked from 3noch/keybase+git-crypt.md
How to add a Keybase user to your repo using git-crypt
keybase pgp pull <keybase.io user>
gpg --edit-key <keybase.io user>
  > lsign
  > save
git-crypt add-gpg-user <keybase.io user>
@taktoa
taktoa / haskell-pain-points.md
Last active October 26, 2019 04:18
A rant about pain points in Haskell, written as a response to https://redd.it/7rwuxb

I started writing this polemic to answer your question, but I ended up touching on most of my gripes with Haskell in general, not just in a corporate context.

GHC

GHC is a modern compiler with an amazing RTS and tons of features, but I have some issues with it.

Monolithic and Hard to Contribute To

@mstksg
mstksg / the_fools_who_dream.md
Last active September 25, 2017 22:04
The Fools Who Dream
title subtitle author
The Fools Who Dream
(Computer Science Edition)
Justin Hurwitz (Lyrics Justin Le)

[Charles Babbage]

His difference engine / did multiplication
And sometimes addition by three

@edsko
edsko / RTTI.hs
Created June 9, 2017 17:54
Run-time type information in Haskell
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
@taktoa
taktoa / incremental.nix
Last active January 8, 2018 12:57
Build the profunctors library incrementally using Nix.
with builtins;
rec {
pkgs = import <nixpkgs> {};
testGHC = pkgs.haskellPackages.ghcWithPackages (p: with p; [
base base-orphans bifunctors comonad contravariant distributive
tagged transformers
]);
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active May 7, 2024 00:47
Commit message guidelines

Commit Message Guidelines

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
@freckletonj
freckletonj / oauth.hs
Created April 27, 2017 21:06
Haskell Servant OAuth2.0 for GitHub
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
module Sand where
import Data.Aeson
@michaelwebb76
michaelwebb76 / Technical Test Instructions.md
Last active February 23, 2023 23:23
Technical Test Instructions

WELCOME

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.

INSTRUCTIONS

  1. Complete the short version of the Big 5 test and save your results as text.
  2. Create a new git repository for your code.
  3. 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.