# SPDX-FileCopyrightText: 2026 Jason Self # SPDX-FileCopyrightText: 2026 Jacob K # # SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later https://trisquel.info/en/comment/reply/31806/183388 Awesome article! I especially like the idea of writing a compiler. Since bf is Turing-complete, you can write a bf interpreter in bf, so the fact that you can compile any bf program to jsinterp means it's possible to write a bf interpreter also. You say that bf "happens to map onto precisely the part of jsinterp that is oldest, most exercised, and least likely to hide a bug", but what do you mean by this? If I understand correctly, your code uses some modern features of jsinterp, like the less than symbol (<), which was added in version 2022.08.14 (specifically commit 8f53dc44a0cc1c2d98c35740b9293462c080f5d0, I think). If I go to yt-dlp version 2026.02.04, then I get an error like this: `Failed to evaluate '' + 'H' in: o+String.fromCharCode(t[p]) (caused by TypeError("unsupported operand type(s) for +: 'int' and 'str'"));` I am confused by this error because it looks to me that '' and 'H' are both strings. Since commit d108ca10b926410ed99031fec86894bfdea8f8eb ("[jsinterp] Support string concatenation with `+` and `+=` (#15990)") seems to fix this, I think maybe the error message is confused and the real problem is that string concatenation with the plus symbol (+) is not implemented in version 2026.02.04. I think this could be worked around by using `.push`ing both strings to an array and then `.join.("")`ing the array. a quote from the article: The boundary isn't a release date; it's a capability date - the first release whose interpreter can express a data-dependent unbounded loop over mutable storage. bfc.py makes that test mechanical: point it at any historical jsinterp.py, run the ladder, and the unary-echo case alone answers "Turing-complete or not" for that revision. I don't think it's actually possible to write a program that answers "Turing-complete or not" in all cases. The fact that you can compile bf to jsinterp does show that jsinterp is Turing-complete, but the fact that your program fails on yt-dlp versions 2026.02.04 and older does not mean that those versions are not Turing-complete. It's just that your particular program doesn't know how to show Turing-completeness for that version. The contents of this page are licensed under the GNU Free Documentation License with no invariant sections.