Skip to content

Instantly share code, notes, and snippets.

View bbarry's full-sized avatar

Bill Barry bbarry

  • Ren Inc
  • Pennsylvania
View GitHub Profile
@bbarry
bbarry / SliceExtensions.cs
Last active December 1, 2015 15:13 — forked from fubar-coder/SliceExtensions.cs
Simple slice implementation for C#
public static class SliceExtensions
{
public static Slice<T> ToSlice<T>(this T[] array)
{
return new Slice<T>(array);
}
public static Slice<T> ToSlice<T>(this T[] array, int offset, int length)
{
return new Slice<T>(array, offset, length);
/*
Implemented pseudocode available at
http://en.wikipedia.org/wiki/Mersenne_twister
as an asm.js module to learn about asm.js
*/
function MersenneTwister(stdlib, foreign, heap) {
"use asm";