Skip to content

Instantly share code, notes, and snippets.

View koterpillar's full-sized avatar

Alexey Kotlyarov koterpillar

View GitHub Profile
@koterpillar
koterpillar / aoc2020-17.hs
Created January 28, 2021 09:35
Solution for Advent of Code 2020, day 17
import Control.Monad (guard)
import Data.List
import qualified Data.Map as Map
import Data.Map (Map)
import Data.Maybe
type Point = [Int]
@koterpillar
koterpillar / kind-projector.gradle
Created November 28, 2019 04:18
Enable Scala kind projector in a Gradle build
// This enables kind projector (https://github.com/typelevel/kind-projector) in a Gradle build.
// Versions used: Gradle 6.0.1, Scala 2.13.1.
ext {
scalaVersionFull = '2.13.1'
scalaVersion = '2.13'
}
configurations {
kindProjectorPlugin
import Control.Concurrent.STM
import qualified Data.Map as M
import Data.Maybe
main = do
pendingV <- atomically $ newTVar M.empty
let handleFst (key, ourVal) =
atomically $ do
pending <- readTVar pendingV
case M.lookup key pending of

Keybase proof

I hereby claim:

  • I am koterpillar on github.
  • I am koterpillar (https://keybase.io/koterpillar) on keybase.
  • I have a public key ASBXeUNdt-vMpptoKMBnmhpxyrO6z2xWcZtM8BU-fWUp7Qo

To claim this, I am signing this object: