Comment

Comment by kibwen

Despite all the reporting on BB(5) I had never seen anyone convey that equivalent high-level formulation from 1993, that's very cool!

EDIT: For fun I converted it to Rust and expected to see it spew a few million numbers into my terminal, but no, this equivalent loop actually terminates after 15 steps, which is fascinating given that the Turing machine takes 47 million steps:

    let mut x = 0;
    loop {
        x = match x % 3 {
            0 => 5 * x + 18,
            1 => 5 * x + 22,
            _ => break
        } / 3;
    }
OEIS link: https://oeis.org/A386909

EDIT 2: Of course the article mentions this in the next paragraph, which is what I get for being immediately nerd-sniped.

parent kibwen 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton