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
function whoIsNext(names, r){ | |
var x = names.length; | |
var pass = ((r - 1)/x) + 1; | |
var cycle = Math.log(pass)/Math.LN2; | |
var grouping = Math.pow(2, Math.floor(cycle)); | |
var cbegin = (grouping - 1) * x; | |
var r_offset = r - cbegin - 1; | |
var r_index = Math.floor(r_offset / grouping); |
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
I don't have a good name for it yet, webstorage git? | |
I want it to be kinda up-and-running for v0.1, so major sections are omitted intentionally. | |
basics: | |
config: object: key/val -> preference/state | |
{ 'branchname': 'master' } | |
tags: object: key/val -> tagname/(commit/tree/blob)hash | |
{ 'head': '' } | |
directory: object: key/val -> fullpathfilename/contents | |
{} |