Supposedly immortal but apparently blockable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package repro | |
import scala.concurrent.duration._ | |
import cats.implicits._ | |
import cats.~> | |
import cats.arrow.FunctionK | |
import cats.data.Kleisli | |
import cats.effect.IO | |
import fs2.Stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loosely documenting my machine setup in an effort to make this somewhat reproducible or automate it in the future | |
- Install PopOS | |
- Install zsh | |
- Install oh-my-zsh | |
- `sudo apt-get install openjdk-11-jdk` | |
- Download / install vscode | |
- Install scalametals vscode extension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package demo | |
import fj.P | |
import kotlin.properties.ReadOnlyProperty | |
import kotlin.reflect.KProperty | |
class FjLazy<in R,T>(init: () -> T) : ReadOnlyProperty<R, T> { | |
val initIt = P.hardMemo(init) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static <A> Option<Tree<A>> filterTopDown(Tree<A> tree, Predicate<A> pred) | |
{ | |
if (!pred.test(tree.root())) | |
{ | |
return none(); | |
} | |
Stream<Tree<A>> filteredChildren = tree.subForest().f().map(child -> filterTopDown(child, pred)).filter(x -> x.isSome()) | |
.map(x -> x.some()); | |
return some(node(tree.root(), filteredChildren)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @flow */ | |
export interface Val { | |
equals<this>(other: this) : boolean | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@flow | |
declare var test: any | |
declare var expect: any | |
import {Seq} from "immutable" | |
test("hmmm", () => { | |
const xs : Seq<number, string> = Seq.of("a", "b", "c") | |
// this does not typecheck, map not found in Seq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.dimitarg.demo; | |
import io.netty.util.concurrent.EventExecutor; | |
import io.netty.util.concurrent.Future; | |
import io.netty.util.concurrent.Promise; | |
import java.util.function.Function; | |
/** | |
* Created by fmap on 25.11.16. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package foo | |
import org.junit.Test | |
import scalaz._ | |
import Scalaz._ | |
import org.junit.Assert._ | |
import org.hamcrest.CoreMatchers.is |