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
var $benchmark = require("./benchmark"); | |
var group = $benchmark.group; | |
var benchmark = $benchmark.benchmark; | |
var runBenchmarks = $benchmark.runBenchmarks; | |
function random(i) { | |
return Math.floor(Math.random() * i); | |
} |
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
module Main where | |
import Prelude | |
import Data.Maybe (Maybe(..)) | |
import Control.Monad.Eff (Eff) | |
import Math (pi, cos, sin) | |
import Graphics.Canvas (CANVAS, Context2D, getCanvasElementById, getContext2D, setFillStyle, fillRect, moveTo, lineTo, withContext, setStrokeStyle, beginPath, closePath, stroke, CanvasElement, getCanvasWidth, getCanvasHeight, clearRect) | |
import DOM (DOM) | |
import DOM.HTML (window) | |
import DOM.HTML.Types (Window) |
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
Copyright (c) 2017 Paul Chapman | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
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
module Main where | |
import Prelude | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Class | |
import Control.Monad.Aff (launchAff, Aff, makeAff, attempt) | |
import Control.Monad.Aff.Console (CONSOLE, log) | |
import Control.Monad.Eff.Exception (Error, try) | |
import Network.HTTP.Affjax as Ajax | |
import Data.Either (Either(..), either) |
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
// Generated by psc-bundle 0.10.3 | |
var PS = {}; | |
(function(exports) { | |
// Generated by psc version 0.10.3 | |
"use strict"; | |
var Control_Category = PS["Control.Category"]; | |
var $$const = function (a) { | |
return function (v) { | |
return a; | |
}; |
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
module Bar | |
open Foo | |
do | |
System.Console.WriteLine(foo) | |
System.Console.WriteLine("Bar") |
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
"use strict" | |
/* | |
* Webpack 2 loader that can take CommonJS output by psc 0.9.1 and convert | |
* it into tree shakable ES6 modules. No transpiling required. | |
*/ | |
const fs = require('fs') | |
const commonJsRequire = /var ([_$a-zA-Z0-9]+) = require\([\'\"]([^\'\"]+)[\'\"]\)/g | |
const moduleExports = /module\.exports = \{(\n( ([\"\'_$a-zA-Z0-9]+): ([_$a-zA-Z0-9\.]+)(, )?\n)*)?\};/m |
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
var benchmark = require("./benchmark"); | |
var immutable = require("immutable"); | |
function generateKeys(counter) { | |
var keys = []; | |
while (counter--) { | |
keys.splice(Math.floor(Math.random() * keys.length), 0, "foo" + counter); | |
} |