Skip to content

Instantly share code, notes, and snippets.

View tribbloid's full-sized avatar

Peng Cheng tribbloid

View GitHub Profile
@SethTisue
SethTisue / chaining-implicits.md
Last active February 19, 2024 00:56
chaining implicit conversions in Scala 2 and Scala 3

in Scala 2, they don't chain 😇, even if we try to give the compiler an assist

can we make them chain in Dotty? 😈

let's try it!

first let's set up sbt:

% cat project/plugins.sbt
@AndyShiue
AndyShiue / CuTT.md
Last active April 28, 2024 23:35
Cubical type theory for dummies

I think I’ve figured out most parts of the cubical type theory papers; I’m going to take a shot to explain it informally in the format of Q&As. I prefer using syntax or terminologies that fit better rather than the more standard ones.

Q: What is cubical type theory?

A: It’s a type theory giving homotopy type theory its computational meaning.

Q: What is homotopy type theory then?

A: It’s traditional type theory (which refers to Martin-Löf type theory in this Q&A) augmented with higher inductive types and the univalence axiom.

@rxin
rxin / benchmark.scala
Created April 22, 2015 06:36
quasiquote vs janino
package org.apache.spark.sql.catalyst.expressions.codegen
import org.codehaus.janino.SimpleCompiler
object CodeGenBenchmark {
def quasiquotes(): Unit = {
import scala.reflect.runtime.{universe => ru}
import scala.reflect.runtime.universe._