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 nl.mdj.fpinscala | |
import java.net.InetSocketAddress | |
import java.nio.channels.AsynchronousChannelGroup | |
import java.util.concurrent.atomic.AtomicInteger | |
import scodec.bits.ByteVector | |
import scala.annotation.tailrec | |
import scalaz.netty.Netty |
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
{-# LANGUAGE TypeFamilies #-} | |
import Data.Function (on) | |
import Control.Applicative | |
data EventData e = EventData { | |
eventId :: Int, | |
body :: Event e | |
} |
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
import cats.Show | |
import cats.data.EitherT | |
import cats.effect.{IO, Sync} | |
import eu.timepit.refined.api.Refined | |
import eu.timepit.refined.collection.NonEmpty | |
import eu.timepit.refined.types.numeric.PosInt | |
import io.chrisdavenport.log4cats.Logger | |
import io.chrisdavenport.log4cats.slf4j.Slf4jLogger | |
import io.circe._ | |
import io.circe.refined._ |
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
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)] | |
public sealed class CsvEntryAttribute : Attribute | |
{ | |
public string HeaderName { get; set; } | |
} | |
public class CsvParser | |
{ | |
private class CsvDescriptor | |
{ |
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
import magnolia.{CaseClass, Magnolia, SealedTrait} | |
import org.specs2.matcher.describe._ | |
import scala.language.experimental.macros | |
object DiffableDerivation { | |
/** binds the Magnolia macro to this derivation object */ | |
implicit def genDiffable[T]: Diffable[T] = macro Magnolia.gen[T] |
This file has been truncated, but you can view the full file.
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
Compiling postgres (14 Scala sources) | |
[E-1] xsbt-analyzer : 1 spans, ()6.485ms (0.0%) | |
[E-1] silencerCheckUnused : 1 spans, ()0.083ms (0.0%) | |
[E-1] scalacenter-profiling : 1 spans, ()3581.37ms (5.1%) | |
[E-1] semanticdb-jvm : 1 spans, ()0.271ms (0.0%) | |
[E-1] jvm : 1 spans, ()977.622ms (1.4%) | |
[E-1] delambdafy : 1 spans, ()100.727ms (0.1%) | |
[E-1] cleanup : 1 spans, ()96.443ms (0.1%) | |
[E-1] mixin : 1 spans, ()94.082ms (0.1%) | |
[E-1] flatten : 1 spans, ()60.325ms (0.1%) |
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 zio.telemetry.opentracing | |
import java.util.concurrent.TimeUnit | |
import io.opentracing.{Span, Tracer} | |
import zio.clock.Clock | |
import zio._ | |
object OpenTracing2 { | |
type OT = Has[Service] |
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 nl.mdj.fpinscala | |
import akka.actor.{Actor, ActorRef, ActorSystem, Props} | |
import akka.pattern.ask | |
import akka.util.Timeout | |
import nl.mdj.fpinscala.KeyValueStore.{KvS, ListKeys} | |
import scala.concurrent.duration._ | |
import scala.concurrent.{ExecutionContext, Await, Future} | |
import scalaz.std.list._ |
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
import japgolly.scalajs.react.vdom.all._ | |
import japgolly.scalajs.react.{ReactElement, SyntheticEvent} | |
import monifu.reactive.Observable | |
import monifu.reactive.subjects.BehaviorSubject | |
object StateExample { | |
//--------------------------------- | |
// (VIEW)-MODEL | |
//--------------------------------- |
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
import jason.HFunctor.HAlgebra | |
import scalaz._ | |
import scalaz.Scalaz._ | |
import io.circe._ | |
trait HFunctor[F[_[_], _]] { | |
def hfmap[M[_], N[_]](nt: M ~> N): F[M, ?] ~> F[N, ?] | |
} | |
object HFunctor { |
NewerOlder