News for hackers. Stuff that matters.
Re:Has Anyone Ever Flipped Heads 76 Times in a Row? by fphilipe on Wednesday January 29, 2014 @11:48AM (#7144999)
Try this in Julia for some extra speed:

    best = 0
    i = 0
    while true
        i += 1
        count = 0
        face = 1
        while face == 1
            face = rand(0:1)
            count += face
        end
        if count > best
            best = count
            println("new record: $best in iteration $i")
        end
    end

There are no comments on this comment yet.