Skip to content

Instantly share code, notes, and snippets.

Hanns Holger Rutz Sciss

Block or report user

Report or block Sciss

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View NewExActMapBlueprint.scala
import scala.language.{higherKinds, implicitConversions}
trait NewExActMapBlueprint {
trait Ex[+A] {
def value: A
trait Act {
def execute(): Unit
Sciss / build.sbt
Created Sep 1, 2019 — forked from markehammons/build.sbt
Packaging your application with a minimized runtime courtesy of jlink
View build.sbt
import{ByteArrayOutputStream, PrintWriter}
import java.util.spi.ToolProvider
//this allows us to run tools like jdeps and jlink from within the JVM
def runTool(name: String, arguments: Seq[String]): Either[String,String] = {
val maybeTool: Option[ToolProvider] = {
val _tool = ToolProvider.findFirst(name)
if(_tool.isPresent) {
View sbt-1.2.8-scala-2.12.9-openjdk11-publish-local-crash
[error] java.lang.AssertionError: assertion failed:
[error] type AnyRef in java.lang
[error] while compiling: /home/hhrutz/Documents/devel/Lucre/geom/src/main/scala/de/sciss/lucre/geom/Space.scala
[error] during phase: globalPhase=terminal, enteringPhase=typer
[error] library version: version 2.12.9
[error] compiler version: version 2.12.9
[error] reconstructed args: -Ywarn-unused:imports -Ywarn-unused:privates -Ywarn-unused:locals -Ywarn-unused:implicits -encoding utf8 -deprecation -Xsource:2.13.0 -release 8 -feature -classpath /home/hhrutz/.ivy2/cache/de.sciss/serial_2.12/jars/serial_2.12-1.1.1.jar -bootclasspath /home/hhrutz/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.9.jar -Xlint:adapted-args -Xlint:nullary-unit -Xlint:inaccessible -Xlint:nullary-override -Xlint:infer-any -Xlint:missing-interpolator -Xlint:doc-detached -Xlint:private-shadow -Xlint:type-parameter-shadow -Xlint:poly-implicit-overload -Xlint:option-implicit -Xlint:delayedinit-select -Xlint:by-n
View Negatum_94fb0dd8.scala
// negatum-94fb0dd8
def Protect(in: GE, lo: Double, hi: Double, dyn: Boolean): GE = {
val in1 = if (lo.isInfinite && hi.isInfinite) in
else if (lo.isInfinite) in.min(hi)
else if (hi.isInfinite) in.max(lo)
else in.clip(lo, hi)
val in2 = if (dyn) else in1
View SortQJackCtlPresets.scala
val fCfg = userHome / ".config" / "" / "QjackCtl.conf"
val cOld = {
val in = new FileInputStream(fCfg)
try {
val sz = in.available()
val arr = new Array[Byte](sz)
View dump-akka-heavy.txt
Full thread dump OpenJDK 64-Bit Server VM (25.212-b03 mixed mode):
"Attach Listener" #152 daemon prio=9 os_prio=0 tid=0x00007f9e9c001000 nid=0x6534 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"scala-execution-context-global-145" #145 daemon prio=6 os_prio=0 tid=0x00007f9e04006000 nid=0x6500 waiting on condition [0x00007f9e29df8000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000005cbdd9d80> (a java.util.concurrent.ForkJoinPool)
at java.util.concurrent.ForkJoinPool.awaitWork(
View SincFilter_FSc.scala
val sr = "sample-rate".attr(44100.0)
//val noiseLen = "noise-dur".attr(1.0).max(0.0) * sr
val numZero = "zero-crossings".attr(6).max(1)
val f1 = "f1".attr( 500.0)
val f2 = "f2".attr(1000.0)
//val roll = "roll".attr(0.0)
val tpe = "type".attr(1).clip(0, 4)
//val noise = WhiteNoise().take(noiseLen)
val noiseLen = 1
View TwoStepBicubicZoom.scala
val in0 = ImageFileIn("in")
val wIn = in0.width
val hIn = in0.height
val wOut = "width".attr(1920)
val hOut = "height".attr(1080)
val num = "num-frames".attr(100)
val gamma = "gamma".attr(1.0)
val szIn = wIn * hIn
val szOut = wOut * hOut
val in = RepeatWindow(in0, szIn, num)
View test.html
em {
font-style: normal;
em::before {
content: "*";
em::after {
View MapFlatMapForExAct.scala
object Sandbox {
the matrix of required support:
map: Ex[Option[A]] -> Ex[B] -> Ex[Option[B]]
map: Ex[Seq[A]] -> Ex[B] -> Ex[Seq[B]]
map: Ex[Option[A]] -> Act -> Ex[Option[Act]]
map: Ex[Seq[A]] -> Act -> Ex[Seq[Act]]
flatMap: Ex[Option[A]] -> Ex[Option[B]] -> Ex[Option[B]]
flatMap: Ex[Seq[A]] - > Ex[Option[B]] -> Ex[Seq[B]]
flatMap: Ex[Seq[A]] - > Ex[Seq[B]] -> Ex[Seq[B]]
You can’t perform that action at this time.