Skip to content

Instantly share code, notes, and snippets.

Avatar
🦉

Lukas Rytz lrytz

🦉
View GitHub Profile
@lrytz
lrytz / Test.java
Last active Oct 1, 2020
ForkJoinPool JDK 11+
View Test.java
import java.util.concurrent.*;
public class Test {
static boolean triggerIssue = true;
static ForkJoinPool fjp;
static void hotSleep(int ms) {
long until = System.nanoTime() + ms*1000_000;
while (System.nanoTime() < until) { }
View nolink.diff
View equals.diff
diff --git a/src/library/scala/collection/Map.scala b/src/library/scala/collection/Map.scala
index 9187c7c041..704a0f7f3e 100644
--- a/src/library/scala/collection/Map.scala
+++ b/src/library/scala/collection/Map.scala
@@ -33,7 +33,7 @@ trait Map[K, +V]
case that: Map[K, _] =>
(this eq that) ||
(that canEqual this) &&
- (this.size == that.size) && {
+ (this.sizeCompare(that) == 0) && {
View live.log
sbt:root> partest --srcpath async test/async/jvm/live.scala
Partest version: 2.13.3-20200619-135756-79afa3f
Compiler under test: $baseDir/compiler
Scala version is: Scala compiler version 2.13.3-20200619-135756-79afa3f -- Copyright 2002-2020, LAMP/EPFL and Lightbend, Inc.
Scalac options are: -Wconf:cat=unchecked&msg=The outer reference in this type test cannot be checked at run time.:s -Wconf:cat=optimizer:is
Compilation Path: /Users/luc/scala/scala13/target/test/it-classes:$baseDir/test:$baseDir/compiler:$baseDir/library:$baseDir/reflect:$baseDir/interactive:$baseDir/repl-frontend:$baseDir/repl:$baseDir/scalap:$baseDir/partest:$baseDir/scaladoc:$baseDir/testkit:/Users/luc/scala/scala13/target/partest-javaagent/scala-partest-javaagent-2.13.3-bin-SNAPSHOT.jar:/Users/luc/Library/Caches/Coursier/v1/http/127.0.0.1%3A8081/artifactory/scala-ci-virtual/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/luc/Library/Caches/Coursier/v1/http/127.0.0.1%3A8081/artifactory/scala-ci-virtual/org/scala-sbt
@lrytz
lrytz / content.txt
Last active Apr 16, 2020
scala-parallel-collections jar
View content.txt
➜ scala-parallel-collections git:(master) unzip -l /Users/luc/.ivy2/local/org.scala-lang.modules/scala-parallel-collections_2.13/0.1.2+107-ca1a2942-SNAPSHOT/bundles/scala-parallel-collections_2.13.jar | c4 | sort
----
META-INF/
META-INF/MANIFEST.MF
Name
scala-parallel-collections.properties
scala/
View given.scala
given object intOrd extends Ord[Int] {}
given object _ extends Ord[Int] {}
given object extends Ord[Int] {}
given val intOrd: Ord[Int] = ...
given val _ : Ord[Int] = ...
given val : Ord[Int] = ...
given def intListOrd(using Ord[Int]): Ord[List[Int]] = ...
given def _(using Ord[Int]): Ord[List[Int]] = ...
View keySetHashCode.scala
➜ sandbox git:(2.13.x) ~/Applications/bin/scala-runners/scala -212x
Welcome to Scala 2.12.11-bin-d1e9ac0 (Java HotSpot(TM) 64-Bit GraalVM EE 19.2.1, Java 1.8.0_231).
Type in expressions for evaluation. Or try :help.
scala> case class K(var x: Int)
defined class K
scala> val k = K(1)
k: K = K(1)
View A.asm
// class version 52.0 (52)
// access flags 0x601
public abstract interface A {
// compiled from: Test.scala
@Lscala/reflect/ScalaSignature;(bytes="\u0006\u0005a1qa\u0001\u0003\u0011\u0002\u0007\u0005q\u0001C\u0003\u000f\u0001\u0011\u0005q\u0002C\u0004\u0014\u0001\u0009\u0007I\u0011\u0001\u000b\u0003\u0003\u0005S\u0011!B\u0001\u0008y\u0015l\u0007\u000f^=?\u0007\u0001\u0019\"\u0001\u0001\u0005\u0011\u0005%aQ\"\u0001\u0006\u000b\u0003-\u0009Qa]2bY\u0006L!!\u0004\u0006\u0003\r\u0005s\u0017PU3g\u0003\u0019!\u0013N\\5uIQ\u0009\u0001\u0003\u0005\u0002\n#%\u0011!C\u0003\u0002\u0005+:LG/A\u0001y+\u0005)\u0002CA\u0005\u0017\u0013\u00099\"BA\u0002J]R\u0004")
ATTRIBUTE ScalaSig : unknown
View config.json
{
"os": [
"linux"
],
"env": {
"global": [
{
"ADOPTOPENJDK": "8"
},
{
View squashpr
#!/bin/bash
set -e
[[ $# == 1 ]] || {
echo "usage: $0 <pr-number>"
exit 1
}
pr=$1