Skip to content

Instantly share code, notes, and snippets.

View lrytz's full-sized avatar
🦉

Lukas Rytz lrytz

🦉
View GitHub Profile
lucmac:sandbox luc$ cat Test.java
public interface Test {
default int foo() { return 1; }
int bar();
}
lucmac:sandbox luc$ javac Test.java
lucmac:sandbox luc$ scala
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Welcome to Scala version 2.11.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25).
Type in expressions to have them evaluated.
diff --git a/library/library.properties b/library/library.properties
index c8c86e0..f0d0d2f 100644
--- a/library/library.properties
+++ b/library/library.properties
@@ -1,6 +1,6 @@
-#Thu, 23 Oct 2014 16:51:46 +0200
+#Tue, 16 Dec 2014 14:46:42 +0100
-version.number=2.11.4
-maven.version.number=2.11.4
lucmac:sandbox luc$ cat Test.scala
package p {
private class C
}
lucmac:sandbox luc$ qsc Test.scala
lucmac:sandbox luc$ asm p/C.class
lucmac:sandbox luc$ asm p/C.class && cat p/C.asm
// class version 50.0 (50)
// access flags 0x21
public class p/C {
@lrytz
lrytz / keybase.md
Created January 13, 2015 17:57
keybase.md

Keybase proof

I hereby claim:

  • I am lrytz on github.
  • I am lrytz (https://keybase.io/lrytz) on keybase.
  • I have a public key whose fingerprint is E208 AF69 6635 7610 528B B279 188F 281C F7FF 724E

To claim this, I am signing this object:

@lrytz
lrytz / README.md
Last active August 29, 2015 14:18
gpsbabel charset
/usr/local/Cellar/gpsbabel/1.5.0/bin/gpsbabel -w -i tomtom -f file.ov2 -o gpx -F file-1.5.0.gpx
/usr/local/Cellar/gpsbabel/1.4.4/bin/gpsbabel -w -i tomtom -f file.ov2 -o gpx -F file-1.4.4.gpx
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite failures="0" time="142.315" errors="1" skipped="42" tests="899" name="org.scalaide.TestsSuite">
<properties>
<property name="java.vendor" value="Sun Microsystems Inc."/>
<property name="osgi.bundles.defaultStartLevel" value="4"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="org.osgi.supports.framework.extension" value="true"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="org.aspectj.weaver.showWeaveInfo" value="true"/>
<property name="os.name" value="Linux"/>
scala> :power
scala> class A {
| object D {
| object E
| }
| }
defined class A
scala> val dModule = typeOf[A].member(newTermName("D"))
--- from_file
+++ Archive: build/osgi/org.scala-lang.modules.scala-
@@ -24,7 +24,7 @@
scala/swing/event/
scala/swing/model/
-------
-494 files
+498 files
la-lang.modules.scala-xml.jar
Name
def readClass(bytes: Array[Byte]): ClassNode = {
val node = new ClassNode()
new ClassReader(bytes).accept(node, Array[Attribute](InlineInfoAttributePrototype), 0)
node
}
def readClass(filename: String): ClassNode = {
val f = new java.io.RandomAccessFile(filename, "r")
val b = new Array[Byte](f.length.toInt)
f.read(b)
@lrytz
lrytz / gist:9d3fe4bb688c9a0f4691
Created September 17, 2015 12:02
inliner bug
➜ sandbox git:(opt/heuristicsPerf) ✗ cat A.scala
object A {
@inline def inner: String = try { throw null } catch { case _: NullPointerException => "npe" }
def foo = try inner catch { case e: Throwable => throw e }
def main(args: Array[String]): Unit = {
println(foo)
}
}
➜ sandbox git:(opt/heuristicsPerf) ✗ qsc A.scala && qs A