This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using toolkit typelevel:default | |
//> using scala 3.6.3 | |
//> using dep org.typelevel::cats-mtl:1.5.0 | |
import cats.effect.* | |
import cats.mtl.{Handle, Raise} | |
import cats.syntax.all.* | |
import cats.mtl.syntax.all.* | |
import cats.* | |
import cats.data.NonEmptyList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S scala-cli shebang -S 3 | |
//> using toolkit typelevel:default | |
//> using dep io.github.iltotore::iron:2.6.0 | |
//> using dep io.github.iltotore::iron-cats:2.6.0 | |
//> using dep io.github.iltotore::iron-circe:2.6.0 | |
import cats.* | |
import cats.data.EitherNec | |
import cats.data.NonEmptyChain | |
import cats.effect.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.tazato | |
import cats.Eq | |
import cats.effect.* | |
import cats.syntax.all.* | |
import cats.parse.Parser as P | |
import cats.parse.Numbers.digits | |
import cats.parse.Rfc5234.{alpha, lf, wsp, octet} | |
object Day7 extends IOApp.Simple { | |
val input = io.Source.fromResource("day7.txt").mkString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.tazato | |
import cats.* | |
import cats.data.NonEmptyList | |
import cats.effect.* | |
import cats.parse.Parser as P | |
import cats.parse.Numbers.digits | |
import cats.parse.Rfc5234.lf | |
import cats.parse.Rfc5234.wsp | |
import cats.syntax.all.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.tazato | |
import cats.* | |
import cats.data.NonEmptyList | |
import cats.effect.* | |
import cats.parse.Parser as P | |
import cats.parse.Numbers.digits | |
import cats.parse.Rfc5234.lf | |
import cats.parse.Rfc5234.wsp | |
import cats.syntax.all.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.tazato | |
import cats.* | |
import cats.effect.* | |
import cats.syntax.all.* | |
import cats.parse.Parser as P | |
import cats.parse.Rfc5234.{digit, wsp} | |
import scala.collection.mutable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.tazato | |
import cats.* | |
import cats.effect.* | |
import cats.syntax.all.* | |
object Day3 extends IOApp.Simple { | |
case class PartNumberCoordinate(xMin: Int, xMax: Int, y: Int) | |
case class PartNumber(partNumber: Int, coordinate: PartNumberCoordinate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.tazato | |
import cats.* | |
import cats.data.NonEmptyList | |
import cats.effect.* | |
import cats.syntax.all.* | |
import cats.parse.* | |
import cats.derived.* | |
import cats.parse.Rfc5234.{alpha, digit, wsp} | |
import scala.io.BufferedSource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.tazato | |
import cats.effect.* | |
object Day1 extends IOApp.Simple { | |
private def eat(s: String): String = { | |
s.replaceAll("one", "o1e") | |
.replaceAll("two", "t2o") | |
.replaceAll("three", "t3e") | |
.replaceAll("four", "f4r") | |
.replaceAll("five", "f5e") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.routes | |
import cats.Applicative | |
import cats.effect.Concurrent | |
import cats.syntax.all.* | |
import org.http4s.* | |
import org.http4s.circe.{jsonEncoderOf, jsonOf} | |
import org.http4s.dsl.Http4sDsl | |
import org.typelevel.ci.CIString | |
import io.circe.generic.semiauto.* |
NewerOlder