@volpegabriel87
@gvolpe
@volpegabriel87
@gvolpe
"A crash course in Category Theory" by Bartosz Milewski (2017)
@volpegabriel87
@gvolpe
"A set of postulates for the foundation of logic" by Alonzo Church (1932)
A universal model of computation that can be used to simulate any Turing Machine
A formal system for expressing a computation based on function abstraction and application
@volpegabriel87
@gvolpe
"LISP specification" by John McCarthy (1958)
Originally created as a practical mathematical notation for computer programs, influenced by the Lambda Calculus system
He also invented garbage collection (implemented in LISP)
@volpegabriel87
@gvolpe
Developed by Ericsson ( Joe Armstrong, Robert Virding, and Mike Williams) in 1986
Distributed, fault-tolerant and highly available
Open Telecom Platform (OTP)
@volpegabriel87
@gvolpe
Haskell committee at FPCA (1987)
Haskell 1.0 (1990)
First versions didn't support I/O
"Escape from the ivory tower: the Haskell journey" by Simon P. Jones
@volpegabriel87
@gvolpe
"Why functional programming matters" by John Hughes (1990)
- Higher-order functions
- Lazy evaluation
Leads to better modularity
@volpegabriel87
@gvolpe
@volpegabriel87
@gvolpe
foo :: Maybe Int
foo = Just 1
bar :: Maybe Int
bar = Just 2
sum :: Maybe Int
sum = foo >>= \x -> bar >>= \y -> return (x + y)
sum' :: Maybe Int
sum' = do
x <- foo
y <- bar
return (x + y)
@volpegabriel87
@gvolpe
"Imperative functional programming" by Simon P. Jones and Philip Wadler (1992)
- IO Monad
- Connecting I/O operations
Ability to mix imperative and purely functional programming, without ruining either
@volpegabriel87
@gvolpe
toUpper :: Char -> Char
getChar :: IO Char
putChar :: Char -> IO ()
(>>=) :: IO a -> (a -> IO b) -> IO b
return :: a -> IO a
getChar >>= (\a -> putChar a)
@volpegabriel87
@gvolpe
main :: IO ()
main = do
putStrLn "Enter your name:"
n <- readLn
putStrLn ("Welcome " <> n)
val program: IO[Unit] =
for {
_ <- IO(println("Enter your name:"))
n <- IO(StdIn.readLine)
_ <- IO(println(s"Welcome $n"))
} yield ()
main :: Effect Unit
main = log "Hello, World!"
@volpegabriel87
@gvolpe
DevOps industry is choosing Nix for its reproducible builds and immutability
@volpegabriel87
@gvolpe
$ curl https://nixos.org/nix/install | sh
$ nix-env -i hello
$ which hello
/home/user/.nix-profile/bin/hello
$ hello
Hello, world!
$ nix-env -e hello
$ nix-shell -p hello
@volpegabriel87
@gvolpe
FP languages can be reasoned about mathematically
@volpegabriel87
@gvolpe
@volpegabriel87
@gvolpe
@volpegabriel87
@gvolpe
@volpegabriel87
@gvolpe