Skip to content

Instantly share code, notes, and snippets.

Avatar

Jason Zaugg retronym

  • Lightbend
  • Brisbane, Australia
View GitHub Profile
@tinkerware
tinkerware / hsdis-elcapitan.sh
Last active Jul 19, 2020
Build hsdis for JDK 1.8u92 on El Capitan
View hsdis-elcapitan.sh
# You will need Mercurial; get it with `brew install hg`.
hg clone http://hg.openjdk.java.net/jdk8u/jdk8u
cd jdk8u
hg update jdk8u92-b14
chmod +x ./get_source.sh; ./get_source.sh
cd hotspot/src/share/tools/hsdis
wget http://ftp.heanet.ie/mirrors/gnu/binutils/binutils-2.26.tar.gz
tar -xzf binutils-2.26.tar.gz
make BINUTILS=binutils-2.26 ARCH=amd64
View universal.scala
// [info] Running p.Run
// List(Fish(Bob, Esq.,12), Kitty(Thor, Esq.,java.awt.Color[r=255,g=200,b=0]))
package misc
import java.awt.Color
trait Pet[A] {
def name(a: A): String
def renamed(a: A, newName: String): A
@retronym
retronym / indylambda.md
Last active Mar 24, 2020
indylambda: Putting invokedynamic to work for Scala
View indylambda.md

indylambda: Putting invokedynamic to work for Scala

Java 8 introduced lambdas to the Java language. While the design choices differ in many regards from Scala's functions, the underlying mechanics used to represent Java lambdas is flexible enough to be used as a target for the Scala compiler.

Lambdas in Java

Java does not have canonical heirarchy of generic function types (ala scala.FunctionN), but instead allows a lambda to be used as a shorthand for an anonymous implementation of an Functional Interface

Here's an example of creating a predicate that closes over one value:

@retronym
retronym / profiling-notes.md
Last active Jun 11, 2017
Compiler Profiling Notes
View profiling-notes.md
View plan.md

Process

  • Scala PR review checklist
  • Scala SIP Template / review checklist

Ideas

  • Finalize classes/methods in stdlib
  • Unused code detection / eradication
  • optimize local lazy vals that don't escape
@gseitz
gseitz / sbt_complete.scala
Created Jul 18, 2012
SBT command for extracting completions
View sbt_complete.scala
package sbtcomplete
import sbt._
import complete.JLineCompletion
import Keys._
object SbtComplete {
private val CompletionsCommand = "completions"
private val CompletionsBrief = ("<arg>", "The string to complete.")
You can’t perform that action at this time.