Skip to content

Instantly share code, notes, and snippets.

View ekmett's full-sized avatar
🤞

Edward Kmett ekmett

🤞
View GitHub Profile
@ekmett
ekmett / yudkowsky.md
Created July 22, 2020 00:06
GPT-3-generated Eliezer Yudkowsky

Edward Kmett sat down with Eliezer Yudkowsky to debate about how to make progress on AI safety.

Edward: Mr. Yudkowsky... can I call you Eliezer?

-- End Prompt

Eliezer: You may, but it's not necessary.

Edward: What do you think of the state of AI safety today?

@ekmett
ekmett / saunders.md
Created July 21, 2020 23:52
GPT-3-generated Saunders Mac Lane.

Anon, a young researcher, sits down with Saunders Mac Lane.

Anon: Please, explain to me in full detail, everything you know about category theory. Indicate where you are uncertain so I may better understand your epistemic state.

-- End Prompt

Saunders: It's the foundation of modern mathematics and computer science. It deals with sets of objects called categories, which can be thought of as collections of things. For example, there is a set called the natural numbers that we use for counting. There is also another set called the real numbers, which are used for computing. The idea behind it is that if two things are in one category, then they must have some relationship to each other. If two things are in two different categories, then they probably don't have any relationship to each other.

Anon: Can you describe how these objects and arrows get used in practice?

Anon, a young researcher, sits down with Saunders Mac Lane.
Anon: Please, explain to me in full detail, everything you know about category theory. Indicate where you are uncertain so I may better understand your epistemic state.
-- End Prompt
Saunders: It's the foundation of modern mathematics and computer science. It deals with sets of objects called categories, which can be thought of as collections of things. For example, there is a set called the natural numbers that we use for counting. There is also another set called the real numbers, which are used for computing. The idea behind it is that if two things are in one category, then they must have some relationship to each other. If two things are in two different categories, then they probably don't have any relationship to each other.
Anon: Can you describe how these objects and arrows get used in practice?

-- Prompt

Jon Pretty sat down with Edward Kmett to learn about Haskell.

Jon: Edward, tell me about how haskell can make me a better programmer.

-- End Prompt

Edward: Well I'll start off by saying that it's not going to be easy for you. You're not just learning a new programming language, but also a whole new way of thinking and creating software. The problem is, there are very few people who have the knowledge and experience to teach you this stuff. And even if they did, it would take them years to do so. So what we need is an organization like us. We specialize in teaching people to program.

@ekmett
ekmett / Divided.hs
Created December 17, 2019 05:11
computational forward/divided differences(?)
{-# language BlockArguments #-}
{-# language RankNTypes #-}
{-# language MultiWayIf #-}
{-# language TypeApplications #-}
{-# language ScopedTypeVariables #-}
{-# language AllowAmbiguousTypes #-}
{-# language DefaultSignatures #-}
{-# language TypeSynonymInstances #-}
{-# language FlexibleInstances #-}
{-# language ConstraintKinds #-}
@ekmett
ekmett / checkpoint.hs
Created July 20, 2019 17:47
checkpointing with 'ad'
{-# language RankNTypes #-}
{-# language FlexibleContexts #-}
{-# language ScopedTypeVariables #-}
import Numeric.AD.Internal.Identity
import Numeric.AD.Internal.Reverse
import Numeric.AD.Internal.Or
import Numeric.AD.Mode
import Numeric.AD.Mode.Reverse (grad)
import Data.Reflection (Reifies)
import Data.Foldable (toList)
@ekmett
ekmett / Allen.hs
Last active March 13, 2019 18:12
Falling sum
-- emit o numbers in an arithmetic series stepping by -r such that the sum
-- of the output numbers is n
-- assumes o > 0
allen :: Double -> Double -> Int -> [Double]
allen n r o = take o [base,base-r..] where
z = fromIntegral o
base = n/z + (z-1)*r/2
Examples:
@ekmett
ekmett / Renaming.hs
Created February 6, 2019 23:29
Towards nominal renaming sets
{-# language DeriveGeneric #-}
{-# language LambdaCase #-}
{-# language DeriveAnyClass #-}
{-# language StrictData #-}
{-# language TypeOperators #-}
{-# language MultiParamTypeClasses #-}
{-# language FlexibleInstances #-}
{-# language UndecidableInstances #-}
---------------------------------------------------------------------------------
@ekmett
ekmett / keybase.md
Created January 25, 2019 00:15
Keybase authentication

Keybase proof

I hereby claim:

  • I am ekmett on github.
  • I am kmett (https://keybase.io/kmett) on keybase.
  • I have a public key ASAwD1T0KltJvc10LhqShIfup48UL87zWURZ7q7ugTfrRQo

To claim this, I am signing this object:

@ekmett
ekmett / init.vim
Created December 13, 2018 16:34
Current vim config
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
set hidden
let g:airline_solarized_bg='dark'
let g:airline_powerline_fonts = 1
let g:airline_theme='luna'
let g:airline_skip_empty_sections = 1
let g:airline_section_a = '' "disable mode