News for hackers. Stuff that matters.
Re:Show HN: Brain Frog – Can you be random enough for 11 lin... by escanor on Thursday June 25, 2026 @04:00AM (#48670359)
it is:

  (async function(oracle, punch, delay) {
    async function sleep(ms) {
      return new Promise((resolve, _) => {
        setTimeout(resolve, ms)
      })
    }
    
    for (let i = 0; i < 100; i++) {
      const state = oracle._state
      const block = oracle.predictNextPunch()
      oracle._state = state
      
      punch(block === 'L' ? 'R' : 'L')
      
      await sleep(delay)
    }
  })(oracle, punch, 150)

There are no comments on this comment yet.