Skip to content

Instantly share code, notes, and snippets.

View BalmungSan's full-sized avatar
👨‍🏫
Learning & Teaching

Luis Miguel Mejía Suárez BalmungSan

👨‍🏫
Learning & Teaching
View GitHub Profile
@BalmungSan
BalmungSan / HighLowPriorityRunner.scala
Last active June 24, 2021 14:29
HighLowPriorityRunner - A CE3 program to schedule high & low priority jobs to be run on a dedicated EC
package example
import cats.effect.Async
import cats.effect.std.Queue
import cats.effect.syntax.all._
import cats.syntax.all._
import scala.concurrent.ExecutionContext
object HighLowPriorityRunner {
@BalmungSan
BalmungSan / MultiTaskRunner.scala
Last active August 23, 2021 20:48
MultiTaskRunner - A CE3 program that runs multiple tasks in parallel and allow them to report their progress
package example
import cats.effect.IO
import cats.effect.kernel.Ref
import cats.syntax.all._
import scala.concurrent.duration._
object MultiTaskRunner {
/** Allows a task to report its progress. */
@BalmungSan
BalmungSan / monads.md
Created November 15, 2022 21:15
What is a Monad and why you shouldn't care

What is a Monad and why you shouldn't care

People trying to learn about FP will heard about the M word sooner than latter. Personally I believe that way sooner than what is required, and recommended; which is what makes folks to be confused about it.

This is my humble attempt to try to briefly explain the concept, while also arguing that you shouldn't really care too much about it. This all with the intention to make your FP journey more enjoyable 😄 — without further ado, let's start.

Motivation behind Monads

@BalmungSan
BalmungSan / NeotypesSchemaDraft.scala
Last active December 13, 2022 22:21
Initial draft of the design for Neotypes-Schema — Explicit decoders
//> using scala "2.13.10"
//> using lib "org.typelevel::cats-effect:3.3.14"
//> using lib "co.fs2::fs2-core:3.4.0"
//> using lib "org.neo4j.driver:neo4j-java-driver:5.3.0"
import cats.effect.IO
import fs2.Stream
import org.neo4j.driver.summary.ResultSummary
import org.neo4j.driver.types.{IsoDuration => NeoDuration, Point => NeoPoint}