Skip to content

Instantly share code, notes, and snippets.

@anilanar
anilanar / .block
Last active April 19, 2016 18:07 — forked from mbostock/.block
selection.order
license: gpl-3.0
@anilanar
anilanar / index.html
Last active January 11, 2017 01:54
Stateful functions #jsbench #jsperf (https://jsbench.github.io/#60079f3a0c0d0b63f491619ac6471ac3) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Stateful functions #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Object structure</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@anilanar
anilanar / index.html
Last active February 4, 2017 21:25
Object structure #jsbench #jsperf (https://jsbench.github.io/#4354da02fb0e22ca7ff344a77af5e7e9) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Object structure #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>

Keybase proof

I hereby claim:

  • I am anilanar on github.
  • I am anilanar (https://keybase.io/anilanar) on keybase.
  • I have a public key ASCNd0mjbAL4Mi3T90GWdi5hzd-EFmHFfdXKy_-lQAwujQo

To claim this, I am signing this object:

@anilanar
anilanar / DiffRecords.purs
Created December 25, 2017 03:34
lodash.without in purescript using RowToList
{-
This is just adventuring with RowToList.
Naive approach, not stack safe, probably too slow.
-}
module DiffRecords
where
import Data.Record (get, insert)
import Data.Symbol (class IsSymbol, SProxy(..))
@anilanar
anilanar / callbag.purs
Last active December 12, 2018 00:39
Callbags in purescript
module Main where
import Prelude
import Data.Array.NonEmpty (NonEmptyArray, (..))
import Data.Traversable (class Traversable, sequence)
import Effect (Effect)
import Effect.Console (log)
import Prelude as P
@anilanar
anilanar / index.html
Last active August 18, 2021 20:10
Different unmount strategies #harp (https://jsbench.github.io/#1a53a5ca3fc415e6c1a4120d2e05c6ad) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Different unmount strategies #harp</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@anilanar
anilanar / safari-nomodule.html
Last active March 9, 2024 13:53 — forked from samthor/safari-nomodule.js
Safari 10.1 `nomodule` support
<!--
Similar to https://gist.github.com/samthor/64b114e4a4f539915a95b91ffd340acc
But prevents Safari 10.1 from downloading ES5 scripts.
This is the only way I know to detect "module" support in <head>.
-->
<script>
// matrix of script sources. rows will be executed in order.
// first column is ES6, the second is ES5.
window.__SCRIPTS__ = [