- Language (and "framework") for building web frontend applications
- Can be used in place of HTML, CSS and JavaScript
- Compiles into the above
How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?
These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.
By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.
module GameState | |
exposing | |
( Game(..) | |
, GameDefinition | |
, PlayState | |
, loading | |
, updateGameDefinition | |
, updatePlayState | |
, updateScore | |
, toReady |
module Main exposing (main) | |
{- | |
Can we make impossible state transtions impossible as impossible state can be impossible? | |
An order has this state machine: Initial -> { Processing, Cancelled }, Processing -> {Cancelled, Shipping}, | |
Shipping -> {Shipped, Lost}. So end states are Cancelled, Shipped and Lost. | |
Let's see if can make the compiler catch when trying to cancel an order that is shipping. |
https://www.nerdfonts.com/font-downloads
The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;
brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || true