Skip to content

Instantly share code, notes, and snippets.

View DarkDimius's full-sized avatar

Dmitry Petrashko DarkDimius

View GitHub Profile
diff --git a/src/scala/compat/java8/JFunction1$mcII$sp.java b/src/scala/compat/java8/JFunction1$mcII$sp.java
index 14fce8a..56eb652 100644
--- a/src/scala/compat/java8/JFunction1$mcII$sp.java
+++ b/src/scala/compat/java8/JFunction1$mcII$sp.java
@@ -5,9 +5,17 @@
package scala.compat.java8;
+import dotty.runtime.vc.VCIntPrototype;
+
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000010779a603, pid=87348, tid=5891
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V [libjvm.dylib+0x39a603] klassItable::initialize_itable_for_interface(int, KlassHandle, bool, Thread*)+0x3f
#
@DarkDimius
DarkDimius / 1.Inheritance.scala
Last active April 19, 2017 08:53
Reachability examples
trait A {/* has a `def toString: String` inherited from scala.Any */}
class B extends A { override def toString = "B"}
class C extends A { override def toString = "C" /* is this dead code? */ }
def main(a: Array[String]): Unit = {
def foo(a: A) = a.toString // does it call .toString on all the A’s?
val b: B = new B;
val c: C = new C;
Software Grant and Individual Contributor License Agreement ("Agreement"), v1.0
In order to clarify the intellectual property license granted with Contributions from any person or entity, EPFL must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of EPFL; it does not change your rights to use your own Contributions for any other purpose.
Please read this document carefully before signing and keep a copy for your records.
You accept and agree to the following terms and conditions for your present and future Contributions submitted to EPFL. Except for the license granted herein to EPFL and recipients of software distributed by EPFL, You reserve all right, title, and interest in and to Your Contributions.
1. Definitions.
"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this
@DarkDimius
DarkDimius / 214.scala
Last active October 5, 2015 11:58
How many Iterables are there in stdlib?
214.
http://www.scala-lang.org/api/current/index.html#scala.collection.Iterable
// if name is listed twice - most likely one is mutable and the other is immutable
::, AbstractBuffer, AbstractIterable, AbstractIterable, AbstractMap, AbstractMap,
AbstractMap, AbstractSeq, AbstractSeq, AbstractSet, AbstractSet, AnyRefMap,
Appended, Appended, Appended, ArrayBuffer, ArraySeq, ArrayStack, BitSet, BitSet,
BitSet, BitSet1, BitSet2, BitSetN, Buffer, BufferProxy, Cons, DefaultKeySet,
class X {
private def foo = 1
}
object X {
class Inner extends X {
override private def foo = 2
}
}
14:48 14:47 ~/Projects/211x/sandbox (2.11.x)$ s

Keybase proof

I hereby claim:

  • I am DarkDimius on github.
  • I am darkdimius (https://keybase.io/darkdimius) on keybase.
  • I have a public key whose fingerprint is D52F 52CB D17F D6EF EB47 672E 4D4B FF78 772D 136D

To claim this, I am signing this object:

import A.;
import A..anon;
import A..anon.1;
import java.lang.Class;
import java.lang.Object;
import java.lang.String;
import java.lang.Throwable;
import java.lang.ref.SoftReference;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
class A{
class Color{}
val o1: {def color:Any} = new {def color: Any = 1 }
val o2 = o1.asInstanceOf[{def color: Color}]
o2.color
}
scala> import scala.collection.par._
import scala.collection.par._
scala> import scala.collection.views.BlitzViews._
import scala.collection.views.BlitzViews._
scala> import scala.collection.par.Scheduler.Implicits.sequential
import scala.collection.par.Scheduler.Implicits.sequential
scala> val mymap = new Map[Int,Int](_ + 10)