Skip to content

Instantly share code, notes, and snippets.

View mstksg's full-sized avatar

Justin Le mstksg

View GitHub Profile
@ezyang
ezyang / haskell-on-windows.md
Last active November 17, 2016 00:00
Haskell on Windows for Linux refugees

Haskell on Windows

These are empirical observations about running Haskell on Windows. If your experiences have been different, I'd love to hear about it.

Install

You'll need to get the

diff -urN htop-1.0.3-orig/CRT.c htop-1.0.3/CRT.c
--- htop-1.0.3-orig/CRT.c 2014-11-04 14:10:29.500604247 +0100
+++ htop-1.0.3/CRT.c 2014-11-04 14:11:01.916663508 +0100
@@ -60,6 +60,9 @@
UPTIME,
BATTERY,
TASKS_RUNNING,
+ TEMPERATURE_COOL,
+ TEMPERATURE_MEDIUM,
+ TEMPERATURE_HOT,
@dbp
dbp / circle.yml
Last active June 29, 2017 09:53
Haskell project with Stack on CircleCI
dependencies:
cache_directories:
- "~/.stack"
pre:
- wget https://github.com/commercialhaskell/stack/releases/download/v0.1.2.0/stack-0.1.2.0-x86_64-linux.gz -O /tmp/stack.gz
- gunzip /tmp/stack.gz && chmod +x /tmp/stack
- sudo mv /tmp/stack /usr/bin/stack
override:
- stack setup
- stack build
{-# language DataKinds, PolyKinds, ScopedTypeVariables, UndecidableInstances,
FlexibleInstances, FlexibleContexts, GADTs, TypeFamilies, RankNTypes,
LambdaCase, TypeOperators, ConstraintKinds #-}
import GHC.TypeLits
import Data.Proxy
import Data.Singletons.Prelude
import Data.Singletons.Decide
import Data.Constraint
@Cedev
Cedev / structrally-free-alternative.hs
Created August 13, 2017 02:12
structurally correct free alternative
{-# Language GADTs #-}
{-# Language DataKinds #-}
{-# Language KindSignatures #-}
{-# Language ViewPatterns #-}
{-# Language RankNTypes #-}
{-# Language ScopedTypeVariables #-}
import Control.Applicative
@DanBurton
DanBurton / stack.yaml
Last active September 24, 2018 01:51
stack.yaml with "setup-info" for ghc-8.6.1-beta1 (aka ghc-8.6.0.20180810)
# Generated from https://gist.github.com/DanBurton/5b7fc5fae1ebfdc5bcaecfbac15d2903
setup-info:
ghc:
windows32:
8.6.0.20180810:
url: https://downloads.haskell.org/~ghc/8.6.1-beta1/ghc-8.6.0.20180810-i386-unknown-mingw32.tar.xz
sha256: 9be35662d510d3489ddd583e7d9d38ee6b6ba40b852f6e90e0dfd97a0d7bbfd3
linux32-nopie:
8.6.0.20180810:
@Icelandjack
Icelandjack / blog_deriving.markdown
Last active October 7, 2019 22:43
Blog Post: Derive instances of representationally equal types

Reddit discusson thread.

I made a way to get more free stuff and free stuff is good.

The current implementation of deriveVia is here, it works with all the examples here. Needs GHC 8.2 and th-desugar.

It doesn't take long

for new Haskellers to get pampered by their compiler. For the price of a line or two the compiler offers to do your job, to write uninteresting code for you (in the form of type classes) such as equality, comparison, serialization, ... in the case of 3-D vectors

@mcpower
mcpower / aoc-2018.css
Last active November 28, 2019 21:28 — forked from lynn/aoc-2018.css
My user stylesheet for Advent of Code
/* Sans-serif for most content. */
body { font-family: "Ubuntu", "Segoe UI", sans-serif; line-height: 1.3em; }
input~span:before, .leaderboard-entry, .privboard-row { font-family: "Source Code Pro", monospace; letter-spacing: -1px; }
/* Emphasis = bold, instead of glowy. */
body * { text-shadow: none !important; }
article em { font-weight: bold; }
/* Center content. */
main>article, main>p, pre.calendar, pre.stats, form, .leaderboard-entry, header { width: 40em !important; margin-left: auto; margin-right: auto; }
@mstksg
mstksg / haskell.yml
Last active September 30, 2021 08:16
Stack Project Github Action Template
# Haskell stack project Github Actions template
# https://gist.github.com/mstksg/11f753d891cee5980326a8ea8c865233
#
# To use, mainly change the list in 'plans' and modify 'include' for
# any OS package manager deps.
#
# Currently not working for cabal-install >= 3
#
# Based on https://raw.githubusercontent.com/commercialhaskell/stack/stable/doc/travis-complex.yml
#
@rstemmer
rstemmer / htop-1.0.2-temperature.patch
Created March 23, 2013 13:32
Adds a new Meter to htop that displays your core temperatures. You need the lm_sensors package to use this meter. After applying this patch, you have to call ./autogen.sh before configuring and compiling.
diff -urN htop-1.0.2-orig/CRT.c htop-1.0.2/CRT.c
--- htop-1.0.2-orig/CRT.c 2013-03-23 14:10:29.500604247 +0100
+++ htop-1.0.2/CRT.c 2013-03-23 14:11:01.916663508 +0100
@@ -59,6 +59,9 @@
UPTIME,
BATTERY,
TASKS_RUNNING,
+ TEMPERATURE_COOL,
+ TEMPERATURE_MEDIUM,
+ TEMPERATURE_HOT,