See https://github.com/sbt/sbt/wiki/sbt-1.x-plugin-migration for the list with sbt 1.x migration status.
plugin | star |
---|---|
playframework/playframework | 9597 |
scala-js/scala-js | 3053 |
sbt/sbt-assembly | 1092 |
mpeltonen/sbt-idea | 1085 |
var StringExpressionParser = function () { | |
this.operators = [ | |
'+', '-', '*', '/', '^' | |
]; | |
this.priorities = [ | |
['*', '/'], | |
['+', '-'] | |
]; | |
}; |
See https://github.com/sbt/sbt/wiki/sbt-1.x-plugin-migration for the list with sbt 1.x migration status.
plugin | star |
---|---|
playframework/playframework | 9597 |
scala-js/scala-js | 3053 |
sbt/sbt-assembly | 1092 |
mpeltonen/sbt-idea | 1085 |
import scala.language.higherKinds | |
import scala.language.implicitConversions | |
object TestNewtypes extends App { | |
/** | |
Changed lines: | |
type NewType = Newtype[T, Tag0] with superduper.Tag[T, this.type] | |
def apply[TagIn, Sub, C](c: C)(implicit tagger: Tagger[TagIn, Type, Tag, Sub, C]): NewType = c.asInstanceOf[T with NewType] |
// allows converting one class to another by providing missing fields | |
object convert { | |
@annotation.implicitNotFound(""" | |
You have not provided enough arguments to convert from ${In} to ${Out}. | |
${Args} | |
""") | |
trait Convertible[Args, In, Out] { | |
def apply(args: Args, in: In): Out | |
} |
import cats.effect._ | |
import java.net.InetSocketAddress | |
import java.nio.channels.AsynchronousChannelGroup | |
import java.util.concurrent.Executors | |
import fs2.Stream | |
import cats.implicits._ |
COLLECTION 0 1 5 10 50 100 500 1000 | |
Array[Int] 16 24 40 56 216 416 2016 4016 | |
immutable.BitSet 24 24 24 24 24 32 96 160 | |
immutable.IntMap[Int] 16 40 328 688 3568 7168 35968 71968 | |
immutable.List[Int] 16 56 216 416 2016 4016 20016 40016 | |
immutable.Map[Int,Int] 16 40 304 720 4856 9680 53504 111760 | |
immutable.Queue[Int] 40 80 240 440 2040 4040 20040 40040 | |
immutable.Set[Int] 16 32 264 480 3016 5840 27696 57952 | |
immutable.SortedMap[Int,Int] 40 88 280 520 2440 4840 30008 62008 | |
immutable.SortedSet[Int] 40 104 296 536 2456 |
import java.util.HashMap; | |
import java.util.UUID; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.TimeUnit; | |
import scala.collection.concurrent.TrieMap; | |
import org.openjdk.jmh.annotations.*; | |
@BenchmarkMode(Mode.AverageTime) |
sealed trait Path | |
case class Field(name: String, child: Option[Path]) extends Path { | |
override def toString: String = child match { | |
case None => name | |
case Some(path) => s"$name.$path" | |
} | |
} |
/* | |
* Consider a simple recursive function like: | |
* f(x) = if (x > 1) f(x - 1) + x | |
* else 0 | |
* | |
* This function isn't tail recursive (it could be, but let's set that aside for a moment). | |
* How can we mechanically, which is to say without thinking about it, convert this into a stack safe recursion? | |
* An approach is to model everything that happens after the recursion as a continuation, and build up that | |
* continuation in a stack safe manner. Here is some example code: | |
*/ |