I hereby claim:
- I am fehu on github.
- I am dkovalev (https://keybase.io/dkovalev) on keybase.
- I have a public key ASC6jkjcXJdj3mGGdz30gh8gsZlZ2FKeHiiuGlskS8MQVQo
To claim this, I am signing this object:
def cachedRec[A, B](rec: (A => B) => (A => B)): A => CachedRecResult[A, B] = { | |
val cache = mutable.HashMap.empty[A, B] | |
// fixed-point combinator | |
def YY(f: (A => B) => (A => B)): A => B = { | |
a => cache.getOrElse(a, { | |
val b = rec(YY(rec))(a) | |
cache += a -> b | |
b | |
}) | |
} |
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
Section "InputDevice" | |
Identifier "Keyboard0" | |
Driver "kbd" | |
EndSection | |
Section "InputClass" | |
Identifier "Keyboard0" | |
MatchIsKeyboard "on" | |
Option "XkbModel" "pc105" |
{-# OPTIONS_GHC -w #-} | |
import XMonad | |
import XMonad.Util.EZConfig | |
import XMonad.Util.NamedActions | |
import XMonad.Util.Run(spawnPipe) | |
import Graphics.X11.ExtraTypes.XF86 | |
import XMonad.Layout.NoBorders |
Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*" | |
, additionalFonts = [] | |
, borderColor = "black" | |
, border = TopB | |
, bgColor = "black" | |
, fgColor = "grey" | |
, alpha = 255 | |
, position = TopW L 100 | |
, textOffset = -1 | |
, iconOffset = -1 |
# Set background with feh | |
./.fehbg | |
# Keyboard setup | |
setxkbmap "us,ru" "altgr-intl," "grp:caps_toggle" "terminate:ctrl_alt_bksp" | |
# Disable Natural Scrolling | |
xinput --set-prop 13 314 0 | |
# Enable While Typing | |
xinput --set-prop 13 326 0 |
import scala.language.higherKinds | |
import shapeless._ | |
import shapeless.ops.hlist.IsHCons | |
/** | |
* Type class supporting access to all the elements of this `HList`, that are lifted sub-types of `U`. | |
* Selects all {{{ F[A] }}}, contained in the list `L`, such that {{{ A <: U }}}. | |
*/ | |
trait CovUnliftFilter[L <: HList, F[_], U] extends DepFn1[L] with Serializable { type Out <: HList } |
interp.load.ivy( | |
"com.lihaoyi" % | |
s"ammonite-shell_${scala.util.Properties.versionNumberString}" % | |
ammonite.Constants.version | |
) | |
@ | |
val shellSession = ammonite.shell.ShellSession() | |
import shellSession._ | |
import ammonite.ops._ | |
import ammonite.shell._ |
import scala.language.experimental.macros | |
import scala.reflect.macros.whitebox | |
object MacroQuestion { | |
def apply[F[_], A]: Any = macro impl[F, A] | |
def impl[F[_], A](c: whitebox.Context)( | |
implicit F: c.WeakTypeTag[F[_]], A: c.WeakTypeTag[A] | |
): c.Tree = { | |
import c.universe._ |
I hereby claim:
To claim this, I am signing this object: