Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
| { | |
| "basics": { | |
| "name": "Thomas Edison", | |
| "label": "Inventor and Businessman", | |
| "picture": "https://example.com/photo.jpg", | |
| "email": "thomas.edison@example.com", | |
| "phone": "(123) 456-7890", | |
| "url": "https://thomasedison.com", | |
| "summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.", | |
| "location": { |
| { | |
| "basics": { | |
| "name": "Thomas Edison", | |
| "label": "Inventor and Businessman", | |
| "picture": "https://example.com/photo.jpg", | |
| "email": "thomas.edison@example.com", | |
| "phone": "(123) 456-7890", | |
| "url": "https://thomasedison.com", | |
| "summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.", | |
| "location": { |
| { | |
| "basics": { | |
| "name": "Thomas Edison", | |
| "label": "Inventor and Businessman", | |
| "picture": "https://example.com/photo.jpg", | |
| "email": "thomas.edison@example.com", | |
| "phone": "(123) 456-7890", | |
| "url": "https://thomasedison.com", | |
| "summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.", | |
| "location": { |
| // 1. Accessing algebras through Type Class(the Fake Type Class Jhon mentioned in his TF dead talk) | |
| // instance for F | |
| class Service { | |
| def fetchUserInfo[F[_]: Concurrent: UserAlg: OrderAlg](id: UserId): F[UserInfo] = ??? | |
| } | |
| // 2. Accessing algebras through interpreters dependencies |
| object Main extends App { | |
| AvoidLosingGenericType.run() | |
| AvoidMatchingOnGenericTypeParams.run() | |
| TypeableExample.run() | |
| TypeTagExample.run() | |
| } | |
| class Funky[A, B](val foo: A, val bar: B) { | |
| override def toString: String = s"Funky($foo, $bar)" | |
| } |
| object game { | |
| case class Lens[S, A](set: A => S => S, get: S => A) { self => | |
| def >>> [B](that: Lens[A, B]): Lens[S, B] = | |
| Lens[S, B]( | |
| set = (b: B) => (s: S) => self.set(that.set(b)(self.get(s)))(s), | |
| get = (s: S) => that.get(self.get(s)) | |
| ) | |
| } | |
| case class Prism[S, A](set: A => S, get: S => Option[A]) { self => |
| #!/usr/bin/env zsh | |
| # | |
| # Garrett Zsh Theme for Prezto | |
| # Created with modified code by Chauncey Garrett - @chauncey_io | |
| # | |
| # http://chauncey.io/projects/zsh-prompt-garrett/ | |
| # | |
| # A prompt with the information you need the moment you need it. | |
| # | |
| # This prompt has the following features: |
| stack --no-system-ghc --install-ghc build ghc-mod hlint stylish-haskell |