Skip to content

Instantly share code, notes, and snippets.

View pshirshov's full-sized avatar
😹

Paul S. pshirshov

😹
View GitHub Profile
@pshirshov
pshirshov / unicorn.md
Last active September 27, 2018 20:31

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGZCAMAAACQbpc2AAADAFBMVEWEBz6FAD6FAD6GAD+MAEGOAEOKAEGOAEOGAD+IAECOAEOOAUOOAEOOAEOOAEOOAEOOAEOOAEOCACyOAEQAAACKAEJpoJ2KADqu0eSKAD2BAD+KAD6AxCNqwoX1Ziawo9LYnGuwhL7aiwaIyYudst6DlrnhcWvCcVvlbE9PvsL2u3uYmdCZum9Rns7clUYsreOYp2nuj37kiZLUfqhvxafqfmrNWEjA22uz1Vu6lsiRAArWhLfgdoONnF36rWrzpz/ajy/LbqR8pdWDVXx8faN6m0+6hE3+1pmHP2mTy1b4k1p/ueFlj7vMfzyBs1v/2GfLpFL5rQD+7teQABj4n0/rpCz6r1Z8apP+4rrfw1iV0JyLUkqQACTDnah5AACtaEt9zcGNhleJbU5lsOFRvE5FuOPS4WLSt7+8ajvXcJpcyNvhztSwUkTGgZz9uDSxRnPZwsnTkqy7jpsPt/AxyvnAeJMAxPnMiqPJYIyzf4/KqrPedaK5bIsQwfTo2t72hUepPWvn6mO8VoXrgbDRaJXle6r75FzZm7S2TnyTNUXv5eiDAA6j0WmKyWv51liRAACjP0OZNVuwa4L+uQAcw/SiNGH57mIxxPKmU3DgpL2sX3rutc3/vh9gu1D3tNEAtvOSKVAmxfagRmbnrcWZJVaTJET2qsv84eyk04PzcEb71OX0u9OUzHD1nsR+1PhtwFUBvfQ5x/RizvdQy/VZzPWaz3b8uST+wFWDABqKAC6m03uGx2X+xGKBxmL2iWDQjb777/Nt0Pf+xmlCyPT+v032hVv+yXD3lGx2wlr99/hJyvX1gFV20vf1e1DCaqr6xdz+wlzJe7T2jmWFACT3i7v+0IP9u0R8xF7Oh7r+zHn/+WLHc7CQGUP3vtePEUT0i7qHADORIUyEAC2BAACf0Hr3j73zhLX7x96RGkrMgbePFEiRDUeOA0

https://dl.bintray.com/sbt/sbt-plugin-releases/
http://repo.typesafe.com/typesafe/ivy-releases/
http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/
http://repo.typesafe.com/typesafe/releases/
@pshirshov
pshirshov / flattenizer.scala
Last active March 19, 2019 21:49
dirty json flattenizer / draft
package com.github.pshirshov.izumi.idealingua.runtime.flatjson
import com.github.pshirshov.izumi.functional.IzEither._
import io.circe._
import io.circe.literal._
import scala.annotation.switch
import scala.collection.mutable.ArrayBuffer
import scala.util.control.NonFatal
@pshirshov
pshirshov / lambda-context.scala
Last active April 14, 2019 22:47
Lamda context extraction / PoC for zio
/*
libraryDependencies += "org.ow2.asm" % "asm" % "7.1"
Java 8+ only
file:line extraction will work for lambdas only. For anonymous classes it will point to the class definition
*/
import java.lang.invoke.SerializedLambda
import org.objectweb.asm._
trait Fake
def materialize1[T[_]]: LightTypeTag = macro TypeTagExampleImpl.makeTag[T[Fake]]
def makeTag[T: c.WeakTypeTag]: c.Expr[LightTypeTag] = {
import c._
val wtt = implicitly[WeakTypeTag[T]]
println(wtt)
???
}
@pshirshov
pshirshov / light_type_tags.scala
Last active July 24, 2019 00:35
Runtime reflection free type tags PoC
package com.github.pshirshov.izumi.fundamentals.reflection
import com.github.pshirshov.izumi.fundamentals.reflection.LightTypeTag.{AbstractKind, AbstractReference, Boundaries, FullReference, Hole, Kind, NameReference, Variance}
import scala.language.experimental.macros
import scala.language.higherKinds
import scala.reflect.macros.blackbox
trait ALTT {
def t: LightTypeTag
# bad: [aa1427a6c35aa832d50f729345783351bc5eaea1] update heap parameter tests to respect disabling of sbt super shell. #SCL-15643
# good: [490d7efd7ed1539dd97bab9711110c19eee201c8] Merge pull request #466 from ingarabr/scalafmt-file-save-bug
git bisect start 'aa1427a6c35aa832d50f729345783351bc5eaea1' '490d7efd7ed1539dd97bab9711110c19eee201c8'
# skip: [977e9d32742fda20cb28cdcc1d444b80a967e1ff] TypeDiff: "flatten" insted of "format"
git bisect skip 977e9d32742fda20cb28cdcc1d444b80a967e1ff
# skip: [7137cd9a73476f1296828d8c35fd9925de40f193] Type mismatch hints: tooltips and navigation
git bisect skip 7137cd9a73476f1296828d8c35fd9925de40f193
# bad: [f7bedf958b260a6a5cf3ac2bcaf9c20ac38f1441] BSP: shared modules: heuristic: synthetic shared source modules depend on their parent's dependencies, but not on their parents directly. synthetic modules do not export their dependencies.
git bisect bad f7bedf958b260a6a5cf3ac2bcaf9c20ac38f1441
# bad: [db650c486ee247b88681ef57b647059979d9fa9a] Added OverrideAbstractMemberInspe
@pshirshov
pshirshov / Markdium-Scala.scala
Created October 7, 2019 19:27
Markdium-Monorepo or Multirepo? Role-Based Repositories
lazy val conditionalProject = if (condition) {
project.in(...)
} else {
null
}
@pshirshov
pshirshov / Markdium-Shell.bash
Created October 7, 2019 19:27
Markdium-Monorepo or Multirepo? Role-Based Repositories
# generates pure JVM project
./sbtgen.sc
# generates JVM/JS cross-project
./sbtgen.sc --js
# generates pure JVM project for just one of our components
./sbtgen.sc -u distage