Skip to content

Instantly share code, notes, and snippets.

title author
Glassery
Oleg Grenrus

After I have improved the raw performance of optika – a JavaScript optics library, it's time to make the library (feature-)complete and sound. Gathering and classifying all possible optic types, gives us a reference point

┌────────────────┬────────────────┬───────┬──────────┐
│ From │ To │ Count │ Time │
╞════════════════╪════════════════╪═══════╪══════════╡
│ Accepted │ - │ 10 │ 150 days │
├────────────────┼────────────────┼───────┼──────────┤
│ Needs revision │ - │ 3 │ 241 days │
├────────────────┼────────────────┼───────┼──────────┤
│ Needs revision │ Pending │ 1 │ 8 days │
├────────────────┼────────────────┼───────┼──────────┤
│ Out-of-scope │ - │ 9 │ 312 days │
@nomeata
nomeata / Demo.v
Last active January 8, 2018 18:47 — forked from mgttlinger/Demo.v
Self contained demonstration of behaviour
Require Import Vectors.Vector.
Section CT.
Context {F : Type -> Type}.
Record Functor__Dict := {
fmap__ {a b} : (a -> b) -> F a -> F b;
fmap_id__ {t} : forall ft, fmap__ (fun a : t => a) ft = ft;
fmap_fusion__ {a b c} : forall (f : a -> b) (g : b -> c) fa, fmap__ g (fmap__ f fa) = fmap__ (fun e => g (f e)) fa
}.
// The source for the graph in https://math.stackexchange.com/q/2265499/53195
digraph w3markov {
layout = neato;
epsilon = 0.0001;
edge [len = 0.8];
node [label=""];
node [width=0.2];
node [height=0.2];
node [fixedsize=true];
@nomeata
nomeata / gist:59c772aa7f47b13e439e629338aea278
Created April 29, 2016 23:34
No scroll on middle mouse button fix
$ cat /etc/X11/xorg.conf.d/30-scoll.conf
Section "InputClass"
Identifier "TPPS/2 IBM TrackPoint"
Driver "libinput"
Option "ScrollMethod" "none"
EndSection
keycode 66 = Super_L
!keycode 78 = Multi_key
keycode 107 = Multi_key
!keycode 113 = Mode_switch
!remove Lock = Super_L
clear Lock
add Mod4 = Super_L
! Französisch per shift-alt
@nomeata
nomeata / TakeR.hs
Last active December 19, 2015 19:39 — forked from sacundim/TakeR.hs
Fix benchmarking (avoid sharing)
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
import Control.Monad.ST
import Data.Foldable as F
import Data.Array.ST
import Data.Sequence (Seq)
import qualified Data.Sequence as Seq
import Criterion.Main
This file has been truncated, but you can view the full file.
/*! JointJS v0.9.3 - JavaScript diagramming library 2015-06-26
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/*!
* jQuery JavaScript Library v2.1.3
* http://jquery.com/
@nomeata
nomeata / gist:c1c7f737a978caa8bf06
Created October 1, 2015 09:49
Strange perf results
$ for x in ghc-7.10-no-call-arity-no-oneshot-plain-foldl ghc-7.10-plain-foldl; do perf stat -r 5 -e cache-references,cache-misses,cycles,instructions,branches,faults,migrations ./$x/nofib/spectral/knights/knights 32 6 +RTS -I0 -V0 -t >/dev/null; done
<<ghc: 330477432 bytes, 632 GCs, 370333/982272 avg/max bytes residency (3 samples), 3M in use, 0.000 INIT (0.000 elapsed), 0.934 MUT (0.934 elapsed), 0.024 GC (0.024 elapsed) :ghc>>
<<ghc: 330477432 bytes, 632 GCs, 370333/982272 avg/max bytes residency (3 samples), 3M in use, 0.000 INIT (0.000 elapsed), 0.933 MUT (0.933 elapsed), 0.024 GC (0.024 elapsed) :ghc>>
<<ghc: 330477432 bytes, 632 GCs, 370333/982272 avg/max bytes residency (3 samples), 3M in use, 0.000 INIT (0.000 elapsed), 0.933 MUT (0.933 elapsed), 0.024 GC (0.024 elapsed) :ghc>>
<<ghc: 330477432 bytes, 632 GCs, 370333/982272 avg/max bytes residency (3 samples), 3M in use, 0.000 INIT (0.000 elapsed), 0.933 MUT (0.934 elapsed), 0.024 GC (0.024 elapsed) :ghc>>
<<ghc: 330477432 bytes, 632 GCs, 370333/98227
@nomeata
nomeata / gist:cf7960caeb0b2c1697b8
Created September 29, 2015 11:47
How does that get slower?
- go [Occ=LoopBreaker] :: Integer -> Int -> [Integer]
- [LclId, Arity=1, Str=DmdType <L,U>]
- go =
- \ (x :: Integer) ->
- let {
- xs [Dmd=<L,C(U)>] :: Int -> [Integer]
- [LclId, Str=DmdType]
- xs =
- go
- (case eqInteger# w2 lvl3 of wild4 { __DEFAULT ->