Skip to content

Instantly share code, notes, and snippets.

Avatar

Tom therewillbecode

View GitHub Profile
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.

@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

@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

View quotes.md

“Science” in its modern sense means trying to reconcile phenomena into models that are as explanatory and predictive as possible." Alan Kay https://tekkie.wordpress.com/2018/11/09/alan-kays-advice-to-computer-science-students/

"In math we deal in abstractions, and abstractions are best understood from multiple perspectives." http://rationalexpressions.blogspot.com/2013/11/exponents-without-repeated.html

<zincy_> How is that not the fooling model?

  • conjunctive (sid433686@gateway/web/irccloud.com/x-crumtmvqckegwlre) has joined
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
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 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

@therewillbecode
therewillbecode / post.md
Last active Nov 26, 2019
Modelling the World of Blade Runner with Haskell's Type System
View post.md

alt text

If you are starting your Haskell journey I implore you to focus on the type system.

Types are the roots from which your Haskell knowledge grows.

Haskell has algebraic data types. This is a fancy way of saying that we can create types which are composites of other types. Intuitively we can think of types as sets of values.