This file contains hidden or 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
import Aggregator.AggregationSyntax | |
import io.getquill.context.ZioJdbc.{QConnection, QDataSource} | |
import io.getquill.{PostgresZioJdbcContext, Query, SnakeCase} | |
import zio._ | |
import zio.blocking.Blocking | |
import zio.console.putStrLn | |
object QuillContext extends PostgresZioJdbcContext(SnakeCase) | |
import QuillContext._ |
This file contains hidden or 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 hlist | |
import hlist.HList.HNil | |
import meetup.TupleExtractor | |
sealed trait HList | |
case class ::[H, T <: HList](head: H, tail: T) extends HList | |
case object HNil extends HList { self => | |
def ::[H](that: H): H :: HNil = new ::(that, self) |
This file contains hidden or 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
object Main { | |
val css: Css.type = Css | |
println(s"PRODUCTION MODE: ${scala.scalajs.LinkingInfo.productionMode}") | |
def main(args: Array[String]): Unit = | |
waitForLoad { | |
val appContainer = dom.document.querySelector("#app") | |
appContainer.innerHTML = "" | |
unmount() |
This file contains hidden or 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
/** A fancy, functional graph encoding taken from here: | |
* https://github.com/snowleopard/alga-paper | |
*/ | |
sealed trait Graph[+A] { self => | |
import Graph._ | |
def toStandardGraph[A1 >: A]: StandardGraph[A1] = | |
fold[StandardGraph[A1]]( | |
empty = StandardGraph(Set.empty, Set.empty), | |
vertex = value => StandardGraph(Set(value), Set.empty), |
This file contains hidden or 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
// HList | |
sealed trait HList | |
object HList { | |
type ::[H, T <: HList] = HCons[H, T] | |
type HNil = HNil.type | |
implicit final class HNilOps(private val self: HNil) extends AnyVal { | |
def ::[A](a: A): A :: HNil = HCons(a, self) |
This file contains hidden or 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 zio.interop | |
import com.raquo.laminar.api.L._ | |
import zio._ | |
import zio.internal.{Executor, Platform} | |
import zio.stream.ZStream | |
import scala.concurrent.ExecutionContext | |
import scala.scalajs.js |
This file contains hidden or 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 zio | |
object PathDependentTypes { | |
val zio1: ZIO[Any, Nothing, Int] = ZIO.succeed(1) | |
val zio2: ZIO[Any, Nothing, Int] = ZIO.succeed(2) | |
val zio3: ZIO[Any, Nothing, Int] = ZIO.succeed(3) | |
val zio4 = zio1 <*> zio2 <*> zio3 <*> zio1 <*> zio2 |
This file contains hidden or 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
What a beautiful file. | |
That's great. | |
One more line will do. |
This file contains hidden or 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
import zio.{RuntimeFlags => _, _} | |
import scala.annotation.implicitNotFound | |
// # ANNOUNCEMENTS | |
// - NEXT WEEK (Friday, 16th) : Akka to ZIO Demo | |
// - NEXT, NEXT WEEK (Friday, 23rd): Akka to ZIO Panel | |
// # ZIO API Design Techniques |
This file contains hidden or 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 zio.http.api.internal | |
sealed trait Box[A] extends Product with Serializable { self => | |
def zip[B](that: Box[B])(implicit zipper: Zipper[A, B]): Box[zipper.Out] = | |
Box.Zip[A, B, zipper.Out](self, that, zipper) | |
def map[B](f: A => B)(implicit tupleSize: TupleSize[B]): Box[B] = | |
Box.Map(self, f, tupleSize) | |
def tupleSize: Int = self match { |