Skip to content

Instantly share code, notes, and snippets.

View smarter's full-sized avatar

Guillaume Martres smarter

View GitHub Profile
#!/bin/sh
./bin/dotc -Ystop-after:frontend -pagewidth 200 -classpath ./library/target/scala-2.12/dotty-library_2.12-0.4.0-bin-SNAPSHOT-nonbootstrapped.jar:./interfaces/target/dotty-interfaces-0.4.0-bin-SNAPSHOT.jar:./compiler/target/scala-2.12/classes:./interfaces/target/classes:./library/target/scala-2.12/classes:$HOME/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.3.jar:$HOME/.ivy2/cache/org.scala-lang.modules/scala-asm/bundles/scala-asm-5.1.0-scala-2.jar:$HOME/.ivy2/cache/com.typesafe.sbt/sbt-interface/jars/sbt-interface-0.13.15.jar:$HOME/.ivy2/cache/org.scala-lang.modules/scala-xml_2.12/bundles/scala-xml_2.12-1.0.6.jar:$HOME/.ivy2/cache/com.vladsch.flexmark/flexmark/jars/flexmark-0.11.1.jar:$HOME/.ivy2/cache/com.vladsch.flexmark/flexmark-util/jars/flexmark-util-0.11.1.jar:$HOME/.ivy2/cache/com.vladsch.flexmark/flexmark-ext-gfm-tasklist/jars/flexmark-ext-gfm-tasklist-0.11.1.jar:$HOME/.ivy2/cache/com.vladsch.flexmark/flexmark-ext-gfm-tables/jars/flexmark-ext-gfm-tables-0.11.1.jar:$HOME/.i
[info] Benchmark Mode Cnt Score Error Units
[info] Worker.compile avgt 10 18353,103 ± 1134,246 ms/op
[info] Worker.compile:·sun.gc.collector.0.invocations avgt 10 14,000 ± 3,024 ?
[info] Worker.compile:·sun.gc.collector.0.lastEntryTime avgt 10 18358908075,300 ± 716151343,167 ?
[info] Worker.compile:·sun.gc.collector.0.lastExitTime avgt 10 18361527163,300 ± 708284286,793 ?
[info] Worker.compile:·sun.gc.collector.0.time avgt 10 774081714,500 ± 89789951,557 ?
[info] Worker.compile:·sun.gc.collector.1.invocations avgt 10 0,400 ± 0,781 ?
[info] Worker.compile:·sun.gc.collector.1.lastEntryTime avgt 10 1
@smarter
smarter / gc-settings.diff
Last active September 19, 2017 00:46
What happens when +UseParallelGC is set in Java 9 EA 181
--- j9g1 2017-09-19 02:42:01.273496793 +0200
+++ j9par 2017-09-19 02:42:33.561940945 +0200
@@ -152,7 +152,7 @@
intx CompilerThreadPriority = -1 {product} {default}
intx CompilerThreadStackSize = 1024 {pd product} {default}
size_t CompressedClassSpaceSize = 1073741824 {product} {default}
- uint ConcGCThreads = 2 {product} {ergonomic}
+ uint ConcGCThreads = 0 {product} {default}
intx ConditionalMoveLimit = 3 {C2 pd product} {default}
intx ContendedPaddingWidth = 128 {product} {default}
-- [E033] Syntax Error: /home/smarter/opt/dotty/compiler/../tests/neg/i1650.scala:3:34 ---------------------------------
3 | def test4[T[P]](x: T[T[List[T[X forSome { type X }]]]]) = ??? // error // error
| ^^^^^^^
| Existential types are no longer supported -
| use a wildcard or dependent type instead
-- [E006] Unbound Identifier Error: /home/smarter/opt/dotty/compiler/../tests/neg/i1650.scala:3:32 ---------------------
3 | def test4[T[P]](x: T[T[List[T[X forSome { type X }]]]]) = ??? // error // error
| ^
| not found: type X
use_synth :piano #tb303
time = 0
max_loops = 2
set :loop_idx, -1
loops_notes = []
object Test {
type F[X <: Int] = Any
type G[X <: Any] = Any
new Foo[F, [X <: Int] => G[X]]
}
class Foo[P[X <: Int] >: Any, Q[X <: Int] >: Any] {
type H[M[X<:Int]]
// http://www.whiteboardcoder.com/2016/03/sbt-customize-shell-prompt-in-sbt.html
shellPrompt := { state =>
def textColor(color: Int) = s"\033[38;5;${color}m"
def backgroundColor(color:Int) = s"\033[48;5;${color}m"
val reset = s"\033[0m"
def bold(x: String) = s"\033[1m${x}${reset}"
// def formatText(str: String)(txtColor: Int, backColor: Int) =
// s"${textColor(txtColor)}${backgroundColor(backColor)}${str}${reset}"
// http://www.whiteboardcoder.com/2016/03/sbt-customize-shell-prompt-in-sbt.html
shellPrompt := { state =>
def textColor(color: Int) = s"\033[38;5;${color}m"
def backgroundColor(color:Int) = s"\033[48;5;${color}m"
val reset = s"\033[0m"
def bold(x: String) = s"\033[1m${x}${reset}"
// def formatText(str: String)(txtColor: Int, backColor: Int) =
// s"${textColor(txtColor)}${backgroundColor(backColor)}${str}${reset}"
exception occurred while typechecking try/outerinnerFoo_2.scala
exception occurred while compiling try/outerinnerTest_2.scala, try/outerinnerFoo_2.scala
Exception in thread "main" java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:347)
at scala.None$.get(Option.scala:345)
at dotty.tools.dotc.typer.Typer.localTyper(Typer.scala:1500)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1519)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1577)
[log <some phase>] ==> glb(<notype>, Any)?
[log <some phase>] <== glb(<notype>, Any) = Any
[log <some phase>] ==> glb(<notype>, Any)?
[log <some phase>] <== glb(<notype>, Any) = Any
[log <some phase>] ==> glb(<notype>, Any)?