Skip to content

Instantly share code, notes, and snippets.

View lenguyenthanh's full-sized avatar
👻

Thanh Le lenguyenthanh

👻
View GitHub Profile
@lenguyenthanh
lenguyenthanh / logback.xml
Created July 16, 2024 07:34 — forked from arosien/logback.xml
scala-cli script to show inserting an otel4s span into a log4cats logger
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<appender name="CONSOLE"
class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%X{traceId} %X{spanId} - %m%n</Pattern>
</layout>
</appender>
id 0
epd rnbqkbnr/pB2p1pp/3p4/2p2p2/8/6P1/PPPPPP1P/RNBQK1NR w KQkq - 0 4 +0+0
2 28
2 682
id 1
epd rnbqkbr1/ppp1pppp/3p1n2/8/3P4/2N3P1/PPP1PP1P/R1BQKBNR w KQq - 1 4 +0+0
2 30
2 863
@lenguyenthanh
lenguyenthanh / 3check.perft
Created April 7, 2023 11:22
Chess variant perft tests
id 0
epd rnbqkbnr/pppp3p/8/5pp1/P3p1P1/2PQ4/1P1PPP1P/RNB1KBNR b KQkq - 1 5 +0+0
4 30
4 912
4 25472
4 766101
id 1
epd r1bqkbnr/npppp1pp/p7/5p2/8/1P5N/P1PPPPPP/RNBQKBR1 b Qkq - 0 5 +0+0
4 20
[
{
"jmhVersion" : "1.36",
"benchmark" : "benchmarks.HashBench.hashes",
"mode" : "thrpt",
"threads" : 1,
"forks" : 5,
"jvm" : "/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java",
"jvmArgs" : [
],
//> using scala "3.2.2"
//> using lib "org.typelevel::toolkit::0.0.3"
//> using repository "https://raw.githubusercontent.com/lichess-org/lila-maven/master"
//> using lib "org.lichess::scalachess:14.6.3"
import cats.effect.{IO, IOApp}
import cats.syntax.all.*
import cats.effect.syntax.all.*
import fs2.*
import fs2.io.file.Files
// scalaVersion := "3.2.0"
// libraryDependencies ++= Seq(
// libraryDependencies ++= Seq(
// "org.typelevel" %% "cats-core" % "2.8.0",
// "dev.zio" %% "zio" % "2.0.0",
// "org.typelevel" %% "cats-effect" % "3.3.14",
// "org.typelevel" %% "kittens" % "3.0.0",
// "dev.zio" %% "zio-json" % "0.3.0-RC10",
// "io.d11" %% "zhttp" % "2.0.0-RC10"
// )
@lenguyenthanh
lenguyenthanh / analysis.draft.md
Created June 15, 2020 14:16 — forked from MattPD/analysis.draft.md
Program Analysis Resources (WIP draft)
package com.lenguyenthanh.functional
import arrow.core.None
import arrow.core.Option
import arrow.core.Some
import arrow.core.extensions.list.functorFilter.filterMap
import arrow.core.extensions.list.functorFilter.flattenOption
import arrow.core.toOption
/**
package arrow.typeclasses
import arrow.Kind
import arrow.core.None
import arrow.core.Option
import arrow.core.Some
import arrow.core.identity
/**
* ank_macro_hierarchy(arrow.typeclasses.FunctorFilter)