Product
type alias Person =
{ name: String
, age: Int
}
makeImportant : String -> String
makeImportant value =
"Emeritus Professor " ++ value
makeOld : Int -> Int
makeOld value =
value * 3
makeImportantAndOld: Person → Person
makeImportantAndOld person =
{ name = makeImportant person.name
, age = makeOld person.age
}
Sum
type IntOrString =
MyInt Int
| MyString String
toString : IntOrString -> String
toString intOrString =
case intOrString of
MyInt int ->
String.toInt int
MyString str ->
str
Dual
Isomorphism
High School
- History of Fable, F# to Js Compiler
- Recently rewritten from scratch and released beta of version 2
- Michael Newton gave a workshop on Fable and Elmish last week! 👏
- Their REPL examples are very cool
- How intercom built a Clojure library to handle advanced RabbitMQ flows
- Reminded me of some work we did at a previous gig regarding exponential backoff and using dead letter exchanges to handle errors and exceptions
- Using Stuart Sierra Component, a framework for handling the lifecycle and dependency of software components
- This really reminded me of GenServers and Supervisors, which are the main way in Elixir to handle state and runtime dependencies.
- Really great explanation of what serverless is good for and bad for
- Serverless can be really really cheap (95% cheaper than EC2)
- Cold starts are way more expensive!
- Best framework is (surprise) serverless
- Detailed analysis of various functional languages to determine best fit for serverless environment regarding size, speed, memory requirements and predictability.
- As we learned from our experiments with DynamoDB, the promise that everything scales infinitely is a big LIE
- There are limits everywhere!
- You don’t know the hardware, the container reuse policies and so on
- It can happen you get stuck to old runtimes, old compilers
- Have to optimize the runtime to start faster, maybe getting rid of GC optimizations
- You have to know your runtime incredibly well and do a lot of yak shaving!
- Learn more: Serverless Computing: Economic and Architectural Impact
This guy is a legend. He wrote “Elixir in Action”, my goto book to recommend to people that want to learn more about designing systems in Elixir.
He talked about building https://github.com/sasa1977/site_encrypt, a project that integrates self certification inside your app.
- This means that it also handles refreshing of such certificate, so no more site down because I forgot to renew the certificate
- Also runs locally so you can test the https settings before deploying to prod
- All this is used to power up his blog, which by itself I think is a great way to learn about the simplicity of Elixir supervisors
- Did a long intro to the language
- You can check it out here: https://reasonml.github.io/docs/en/what-and-why
- Really impressed with compiler, tooling and editor integration
- Finally understood how ReasonML came to life!