Skip to content

Instantly share code, notes, and snippets.

View taktoa's full-sized avatar
🤔
Confused about why this feature exists

Remy Goldschmidt taktoa

🤔
Confused about why this feature exists
View GitHub Profile
@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

ArrayFire Nix Package

I haven't tested this under the full Nix sandbox, so it may still have some impurities.

If you have rustup installed and you want to build the ArrayFire Rust bindings impurely, just remember to set the AF_PATH environment variable to the output path resulting from building arrayfire.nix.

@taktoa
taktoa / mrkgnaow-xmonad.nix
Created September 25, 2017 15:30
Example of using `callCabal2nix` to set up xmonad with a cabalized configuration
{ pkgs }:
{
services.windowManager.xmonad = {
enable = true;
haskellPackages = pkgs.haskellPackages.override {
overrides = self: super: {
# /path/to/mrkgnaow-xmonad is a path that contains `mrkgnaow-xmonad.cabal`
# you can also put an invocation of `fetchgit` or `fetchFromGitHub` there.
mrkgnaow-xmonad = self.callCabal2nix "mrkgnaow-xmonad" /path/to/mrkgnaow-xmonad {};

Things to keep in mind

  • If you write a server using raw UDP, the size of a packet returned as a result of a packet received must be strictly smaller than the size of the packet received, to prevent DoS amplification attacks.

Ideas to improve my workflow

Easy

diff-factor-comments

A script that automatically separates a Haskell file diff into two diffs: one with only changes to comments, and one with changes to actual code.

Could be extended to other languages, as long as you can describe what the

--------------------------------------------------------------------------------
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE KindSignatures #-}
@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
]);
@taktoa
taktoa / .ghci
Last active December 27, 2017 18:11
My .ghci dotfile
--------------------------------------------------------------------------------
---- Reset all metaflags -------------------------------------------------------
:unset +m
:unset +r
:unset +s
:unset +t
:unset +c
--------------------------------------------------------------------------------
@taktoa
taktoa / KindOfGenerativeModuleFunctors.agda
Created November 27, 2017 17:21
A quasi-successful attempt at hacking generative module functors into Agda 2.5.3
module KindOfGenerativeModuleFunctors where
------------------------------------------------------------------------------
open import Data.Product using (_×_; _,_)
open import Data.Nat using (ℕ)
open import Data.Bool using (Bool; false; true)
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl)
------------------------------------------------------------------------------
@taktoa
taktoa / .hlint.yaml
Created November 19, 2017 04:07
My HLint YAML file
- extensions:
- default: true
# These are basically non-negotiable
- {name: AllowAmbiguousTypes, within: []} # should never be necessary
- {name: Arrows, within: []} # weird syntax
- {name: DatatypeContexts, within: []} # useless
- {name: EmptyCase, within: []} # nearly useless
- {name: ImpredicativeTypes, within: []} # very buggy
- {name: IncoherentInstances, within: []} # footgun