Skip to content

Instantly share code, notes, and snippets.

View lrytz's full-sized avatar
🦉

Lukas Rytz lrytz

🦉
View GitHub Profile
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 / 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
@lrytz
lrytz / .gitconfig
Last active September 28, 2015 08:43
3+2x2-way git mergetool
[mergetool "meld"]
cmd = meld $LOCAL $BASE $REMOTE -o $MERGED --diff $BASE $LOCAL --diff $BASE $REMOTE
[mergetool "diffmerge"]
cmd = ~/Applications/bin/diffmergemergetool `pwd` \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
trustExitCode = false
[mergetool "ksdiff"]
cmd = ~/Applications/bin/ksdiffmergetool `pwd` \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
trustExitCode = true
[scala-js] [info] scala.Null
[scala-js] [error] x classTag of scala.Null should contain proper Class[_] - #297
[scala-js] [error] Expected false to be truthy.
[scala-js] org.scalajs.jasminetest.JasmineTestException: TypeError: Cannot call method "getName__T" of null in Lorg_scalajs_testsuite_compiler_RuntimeTypesTest$.sjsir (line 89)
[scala-js] at <jscode>.(file:/home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.1/project-builds/scala-js-92e312025f2a50a9f2d752e4e3c75865eadeb89e/test-suite/src/test/scala/org/scalajs/testsuite/compiler/RuntimeTypesTest.scala:56)
[scala-js] at <jscode>.(file:/home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.1/project-builds/scala-js-92e312025f2a50a9f2d752e4e3c75865eadeb89e/test-suite/src/test/scala/org/scalajs/testsuite/compiler/RuntimeTypesTest.scala:53)
[scala-js] at <jscode>.(https://raw.githubusercontent.com/scala-js/scala-js/v0.6.4/library/src/main/scala/scala/scalajs/runtime/AnonFunctions.scala:10)
[scala-js] at <jsco