Skip to content

Instantly share code, notes, and snippets.

View Tewuzij's full-sized avatar

Tewuzij

View GitHub Profile

The Scott Alexander Email: An Explainer

So, Scott Alexander sent an email to someone in 2014. In 2021 the person who got that email thought that Scott was not being honest about his relationship to the neoreactionary movement, so they published it.

Although this has been widely available, even people who have read it have often missed what the email is saying. There are some cases of genuine ambiguity, where there can be more than one meaning. There are also cases where there is only one plausible meaning, but that meaning is expressed indirectly, subtly, or by linking to something else. Because what the email is saying can be difficult to understand, it seems like it would be of general interest to publish an explainer that went over these ambiguities and the links.

It has sometimes been said that this email should not be read because it was released without permission. This seems like a bad position.

First, because information is information. We know, due to the circumstances, that this was somewhat i

@VictorTaelin
VictorTaelin / truly_optimal_evaluation_with_unordered_superpositions.md
Last active August 5, 2025 15:27
Truly Optimal Evaluation with Unordered Superpositions

Truly Optimal Evaluation with Unordered Superpositions

In this post, I'll address two subjects:

  1. How to solve HVM's quadratic slowdown compared to GHC in some cases

  2. Why that is relevant to logic programming, unification, and program search

Optimal Evaluators aren't Optimal

@ttesmer
ttesmer / AD.hs
Last active December 27, 2025 06:03
Automatic Differentiation in 38 lines of Haskell using Operator Overloading and Dual Numbers. Inspired by conal.net/papers/beautiful-differentiation
{-# LANGUAGE TypeSynonymInstances #-}
data Dual d = D Float d deriving Show
type Float' = Float
diff :: (Dual Float' -> Dual Float') -> Float -> Float'
diff f x = y'
where D y y' = f (D x 1)
class VectorSpace v where
zero :: v
@nicuveo
nicuveo / Main.hs
Last active May 12, 2025 10:27
Minimalistic JSON parser, using a Parsec-like approach
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE LambdaCase #-}
import Control.Applicative (liftA2)
import Data.Char
import Data.Foldable (for_)
import Data.Functor
import qualified Data.HashMap.Strict as M
import Data.List (intercalate)
import Prelude hiding (any)
main :: IO ()
main = mapM_ putStrLn beerLines
where
beerLines = concatMap genLines [99, 98..1]
genLines n =
[ firstLine n
, "Take one down, pass it around, " ++ suffix n
]
@i-am-tom
i-am-tom / FizzBuzz.hs
Last active December 21, 2024 10:17
Arguably the fastest implementation of FizzBuzz ever written.
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UnsaturatedTypeFamilies #-}
import GHC.TypeLits
import Prelude hiding (Functor, Semigroup)
type Main = (Fizz <> Buzz) <$> (0 `To` 100)
@Espionage724
Espionage724 / 1-Info.txt
Last active July 30, 2026 23:55
Various Windows 10 Batch Files and Notes
Various Windows 10 Batch Files and Notes
- Notably for improving privacy on Windows 10
- Some performance tweaks
--Roughly based on https://github.com/Gabriel439/Haskell-Morte-Library/blob/master/src/Morte/Core.hs by Gabriel Gonzalez et al.
data Expr = Star | Box | Var Int | Lam Int Expr Expr | Pi Int Expr Expr | App Expr Expr deriving (Show, Eq)
subst v e (Var v') | v == v' = e
subst v e (Lam v' ta b ) | v == v' = Lam v' (subst v e ta) b
subst v e (Lam v' ta b ) = Lam v' (subst v e ta) (subst v e b )
subst v e (Pi v' ta tb) | v == v' = Pi v' (subst v e ta) tb
subst v e (Pi v' ta tb) = Pi v' (subst v e ta) (subst v e tb)
subst v e (App f a ) = App (subst v e f ) (subst v e a )
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ViewPatterns #-}
module Idiom where
import Data.Foldable
import Data.List
import Data.MarkovChain
import System.Environment
import System.Random