- Sixth Summer School on Formal Techniques / 22-27 May
- Twelfth International Summer School on Advanced Computer Architecture and Compilation for High-Performance and Embedded Systems / 10-16 July 2016
- Oregon Programming Languages Summer School / 20 June-2 July 2016
- The 6th Halmstad Summer School on Testing / 13-16 June, 2016
- Second International Summer School on Behavioural Types / 27 June-1 July 2016
- Virtual Machines Summer School 2016 / 31 May - 3 June 2016
- ECOOP 2016 Summer School
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 org.junit.Test | |
import org.junit.Assert._ | |
import scala.util.chaining._ | |
import scala.collection.mutable.ListBuffer | |
import scala.language.implicitConversions | |
// Breadth-first labeling -- http://okmij.org/ftp/Algorithms/BFN.html | |
// Breadth-First Numbering: An Algorithm in Pictures -- https://okasaki.blogspot.com/2008/07/breadth-first-numbering-algorithm-in.html | |
// The Under-Appreciated Unfold -- https://www.cs.ox.ac.uk/people/jeremy.gibbons/publications/unfold.ps.gz | |
class BFNTest { |
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 scala.quoted._ | |
import scala.quoted.util._ | |
import scala.language.implicitConversions | |
trait Virtualized { | |
type Cde[A] | |
given IntPrimitiveMethods as PrimitiveMethods[Int] = IntPrimitiveMethodsImpl | |
protected val IntPrimitiveMethodsImpl: PrimitiveMethods[Int] = new PrimitiveMethods[Int]{ } |
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 scala.compiletime.ops._ | |
import scala.compiletime.ops.int._ | |
import scala.compiletime.ops.any._ | |
/** | |
* Type your matrices for great good: a Haskell library of typed matrices and applications (functional pearl) | |
* https://dl.acm.org/doi/10.1145/3406088.3409019 | |
*/ | |
object Test { |
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
// A simple type-safe formatter in Scala based on the "Functional Unparsing" paper by Olivier Danvy | |
// http://cs.au.dk/~danvy/DSc/16_danvy_jfp-1998.pdf | |
object Test { | |
def eol[A](k: String => A)(s: String): A = { | |
k(s + "\n") | |
} |
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
object FRP { | |
class Signal[T](expr: => T) { | |
import Signal._ | |
private var myExpr: () => T = _ | |
private var myValue: T = _ | |
private var observers: Set[Signal[_]] = Set() | |
update(expr) | |
protected def update(expr: => T): Unit = { |
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
object Fluent { | |
trait Foo[C[_]] { | |
def meth1[T]() : C[T] | |
} | |
trait ConcreteC[T] | |
class Lib[ElemT]{ |
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 builders; | |
import java.util.function.Function; | |
public class Cont { | |
interface K<A, B, C> extends Function<Function<A, B>, C>{ } | |
/* | |
* Step 1: https://en.wikibooks.org/wiki/Haskell/Continuation_passing_style | |
* ---> just transforming continuations of type (a->r)->r to polymorphic (a->b)->c |
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
(* http://fssnip.net/sE in BER MetaOCaml *) | |
open Runcode;; | |
let rec fix : (('a -> 'b) -> ('a -> 'b)) -> 'a -> 'b = fun f x -> | |
f (fix f) x;; | |
let fix' : (('a -> 'b) code -> ('a -> 'b) code) -> ('a -> 'b) code = fun f -> | |
.< fun x -> let rec loop x = (fun f' -> .~(f .<f'>.) ) loop x in | |
loop x >.;; |
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 benchmark; | |
import java.util.stream.*; | |
import org.openjdk.jmh.annotations.*; | |
import java.util.concurrent.TimeUnit; | |
import java.util.*; | |
@OutputTimeUnit(TimeUnit.NANOSECONDS) | |
@BenchmarkMode(Mode.AverageTime) | |
public class MyBenchmark { |
NewerOlder