Skip to content

Instantly share code, notes, and snippets.

View smarter's full-sized avatar

Guillaume Martres smarter

View GitHub Profile
//> using scala 3.nightly
import scala.language.experimental.relaxedExtensionImports
object A:
extension (s: String)
def wow: Unit = println(s)
object B:
extension (i: Int)
def wow: Unit = println(i)
From 8606ae2990c191766b5b7c9eca250f4569632abe Mon Sep 17 00:00:00 2001
From: Guillaume Martres <smarter@ubuntu.com>
Date: Wed, 24 Mar 2021 12:37:44 +0100
Subject: [PATCH] CI: turn off option that runs git submodule foreach
Because this is run without running git submodule update first, it seems
to break whenever a submodule is deleted.
---
.github/workflows/ci.yaml | 52 +++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
This file has been truncated, but you can view the full file.
[2020-10-02 19:10:12Z INFO HostContext] No proxy settings were found based on environmental variables (http_proxy/https_proxy/HTTP_PROXY/HTTPS_PROXY)
[2020-10-02 19:10:12Z INFO HostContext] Well known directory 'Bin': '/home/drone/github-actions-runners/runner-1/bin.2.273.5'
[2020-10-02 19:10:12Z INFO HostContext] Well known directory 'Root': '/home/drone/github-actions-runners/runner-1'
[2020-10-02 19:10:12Z INFO HostContext] Well known config file 'Credentials': '/home/drone/github-actions-runners/runner-1/.credentials'
[2020-10-02 19:10:12Z INFO Listener] Runner is built for Linux (X64) - linux-x64.
[2020-10-02 19:10:12Z INFO Listener] RuntimeInformation: Linux 4.4.0-151-generic #178-Ubuntu SMP Tue Jun 11 08:30:22 UTC 2019.
[2020-10-02 19:10:12Z INFO Listener] Version: 2.273.5
[2020-10-02 19:10:12Z INFO Listener] Commit: a79bab4b3c993a205a2d73d2b618299d8a96bd26
[2020-10-02 19:10:12Z INFO Listener] Culture: en-US
[2020-10-02 19:10:12Z INFO Listener] UI Culture: en-US
Lisp Backtrace:
"looking-at" (0x91c61e70)
"scala-syntax:looking-at-simplePattern-beginning" (0x91c620d0)
"scala-font-lock:limit-pattern2" (0x91c623a0)
"scala-font-lock:limit-pattern" (0x91c625f0)
"eval" (0x91c627d0)
"font-lock-fontify-keywords-region" (0x91c62d30)
"font-lock-default-fontify-region" (0x91c63050)
"font-lock-fontify-region" (0x91c632c8)
0x84976b0 PVEC_COMPILED
rep: Update report:
Resolve time: -1 ms, Download time: -1 ms, Download size: -1 bytes
test:
ch.epfl.lamp:dotty-doc_0.14:0.14.0-RC1:default (artifactId=dotty-doc_0.14, project.version=0.14.0-RC1, pom.groupId=ch.epfl.lamp, groupId=ch.epfl.lamp, project.groupId=ch.epfl.lamp, version=0.14.0-RC1, pom.version=0.14.0-RC1, project.artifactId=dotty-doc_0.14, pom.artifactId=dotty-doc_0.14): (Artifact(dotty-doc_0.14, jar, jar, None, Vector(), Some(https://repo1.maven.org/maven2/ch/epfl/lamp/dotty-doc_0.14/0.14.0-RC1/dotty-doc_0.14-0.14.0-RC1.jar), Map(artifactId -> dotty-doc_0.14, project.version -> 0.14.0-RC1, pom.groupId -> ch.epfl.lamp, groupId -> ch.epfl.lamp, project.groupId -> ch.epfl.lamp, version -> 0.14.0-RC1, pom.version -> 0.14.0-RC1, project.artifactId -> dotty-doc_0.14, pom.artifactId -> dotty-doc_0.14), None),/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/ch/epfl/lamp/dotty-doc_0.14/0.14.0-RC1/dotty-doc_0.14-0.14.0-RC1.jar)
org.scala-sbt:compi
@smarter
smarter / sbt
Created February 18, 2019 16:32
#!/bin/bash
#SBT_OPTS="-Xms512M -Xmx4096M -XX:ReservedCodeCacheSize=1024M -XX:+CMSClassUnloadingEnabled"
#SBT_OPTS="-Xms512M -Xmx1536M -XX:+CMSClassUnloadingEnabled -XX:MaxInlineLevel=35"
SBT_OPTS="-Xms512M -Xmx6192M -XX:ReservedCodeCacheSize=1024M -XX:+CMSClassUnloadingEnabled -XX:MaxInlineLevel=35"
ARGS=()
while [ $# -ne 0 ]; do
case $1 in
-D*)
[ {
"id" : "wsdPkgMetrics/compile",
"compilerVersion" : "0.10.0-RC1",
"compilerArguments" : [ ],
"sourceDirectories" : [ "wsdPkgMetrics/src" ],
"dependencyClasspath" : [ "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/ammonite-ops_2.12/1.3.2/ammonite-ops_2.12-1.3.2.jar", "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/ch/epfl/lamp/dotty-library_0.10/0.10.0-RC1/dotty-library_0.10-0.10.0-RC1.jar", "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/geny_2.12/0.1.2/geny_2.12-0.1.2.jar", "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.7/scala-library-2.12.7.jar", "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.25.2/sqlite-jdbc-3.25.2.jar", "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/ch/epfl/lamp/scala-library/0.10.0-RC1/scala-library-0.10.0-RC1.jar" ],
"classDirectory" : "out/wsdPkgMetrics/compile/dest/classes"
} ]
[ {
"id" : "wsdPkgMetrics/compile",
"compilerVersion" : "0.10.0-RC1",
"compilerArguments" : [ ],
"sourceDirectories" : [ "wsdPkgMetrics/src" ],
"dependencyClasspath" : [ "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/ammonite-ops_2.12/1.3.2/ammonite-ops_2.12-1.3.2.jar", "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/ch/epfl/lamp/dotty-library_0.10/0.10.0-RC1/dotty-library_0.10-0.10.0-RC1.jar", "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/geny_2.12/0.1.2/geny_2.12-0.1.2.jar", "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.7/scala-library-2.12.7.jar", "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.25.2/sqlite-jdbc-3.25.2.jar", "/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/ch/epfl/lamp/scala-library/0.10.0-RC1/scala-library-0.10.0-RC1.jar" ],
"classDirectory" : "out/wsdPkgMetrics/compile/dest/classes"
} ]
object foo {
abstract sealed class num
final case class One() extends num
final case class Bit0(a: num) extends num
final case class Bit1(a: num) extends num
abstract sealed class char
final case class zero_char() extends char
final case class Char(a: num) extends char
trait Stream[+F[_], +A]
object Stream {
// Make scalac get over its oudenophobia.
type Nothing2[X] <: Nothing
def emits[F[x] >: Nothing2[x], A](as: List[A]): Stream[F, A] = new Stream[F, A] {}
implicit class InvariantOps[F[x] >: Nothing2[x], A](private val self: Stream[F, A]) extends AnyVal {
def ethrough[B](p: Stream[F, A] => Stream[F, B]): Stream[F, B] = p(self)