Skip to content

Instantly share code, notes, and snippets.

Avatar

Tom therewillbecode

  • Edinburgh, UK
View GitHub Profile
View Spacemacs.md

buffers

minibuffer helm mini (launche buffers open and recentfiles

spc b b

move buffer to window n

spc b [n]

erase buffer

spc b e

View gist:fea4a5c2437ea5b15018c4860cf5ba07
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Socket.Table where
import Control.Concurrent hiding ( yield )
import Control.Concurrent.Async
import Control.Concurrent.STM
import qualified Data.Map.Lazy as M
import Database.Persist.Postgresql
import qualified Network.WebSockets as WS
View gist:736efa318fb6874956e92cbc87c32483
Code by Petzold
Nand2Tetris
Ben Eater 6502 breadboard project
Computerphile how memory works
https://www.youtube.com/watch?v=XETZoRYdtkw
https://www.youtube.com/watch?v=-Ecf7lb4aZ0
@therewillbecode
therewillbecode / haskell_exceptions_notes.md
Last active Apr 25, 2020
Exceptions in Haskell Notes
View haskell_exceptions_notes.md

Exceptions

All code that runs in IO can experience exceptions of any type.

Remember you can only catch an exception in IO. But it is possible to throw exceptions from pure code. An example of this is error.

Throw doesn't throw until forced

Due to laziness the order of evaluation of expressions can be modified by the compiler. This means that throw can return an

@therewillbecode
therewillbecode / generics-zurihac-2020.md
Last active Jun 13, 2020
Generics Seminar Zurihac Notes -2020
View generics-zurihac-2020.md

Generics Seminar

Generics are about sitting between a nominal and structural view of types.

Parametric Polymorphism Vs Types Classes Vs Generics

Parametric Polymorpishm - says behave on all types in exactly same way

on the other hand typeclasses is an interface which behaves differently depending on the type

Generics are in between the two extremes

View math_insights.md

Number theory

Primes are the atoms of the integers.

Fundamental theorem of arithmetic

Absolute values and inequalities

Remember to flip inequalities when taking the reciprocal of both sides or multiplying/diving both sides by a negative.

View quotes.md