Talk:Disan Count

From Esolang
Jump to navigation Jump to search

I can see a few problems with a program like this for testing languages:

  • You don't need to be able to do conditionals to write the program. You could do a loop counting by 2s, for example, and get at only the even numbers that way.
  • It definitely doesn't require a language to be Turing-complete. For example, nothing about this enforces access to infinite memory (unless you require bignums) and it doesn't prove that a program can do an infinite loop. Plenty of languages are powerful enough to run this program, but not others.

--ais523 00:52, 14 December 2017 (UTC)

Yes, I should have been more specific. A Disan Count actually requires a step of one when going from 0 to n, and check for parity using an if statement. It also states that n should be 'as arbitrarily big as intended'. Also, in the original implementation it assumed the algorithm was implemented using jump statements in a way that the jump could happen indefinitely as long as the condition for it to jump was achieved. I will fix this page, thank you.

--Lartu (talk) 03:26, 14 December 2017 (UTC)Lartu

The problem still doesn't need Turing-completeness to work, though. You can solve it with a linear bounded automaton. For example, here's a Disan count in BuzzFizz:

# Ensure that n has been input.
if n\$a: # do nothing
else: # still do nothing

if 2\$a: print $a
if 2\$a: print " is even!\n"
else: # do nothing

$a++

if n\$a: # do nothing
else: loop

This seems to obey all your requirements (a potentially infinite loop, checking for parity with an if statement, stepping $a by 1 on each loop iteration), but the language falls short of Turing-completeness because it can't reliably read $a once the value gets higher than the value in $n, something which never comes up while running the Disan count. This sort of requirement is a very hard one to model in "one example program" demonstrations (unless the program is an interpreter for a Turing-complete language) because it's not enough to think of every potential problem that appears in your program; you have to think of every potential problem outside, too. There are infinitely many possible reasons a language might not be Turing-complete, and your program/requirements can only encompass finitely many of them. --ais523 12:14, 16 December 2017 (UTC)

I can rephrase the statement in the second sentence much more strongly: if you want one example program that demonstrates that a language definitely is Turing-complete, that example program must be an interpreter for a Turing-complete language.
That said, problems like Disan Count can still serve as disqualifying tests: if a language is claimed to be Turing-complete, but you can't implement Disan Count in it, then the claim is false. --Chris Pressey (talk) 08:33, 23 June 2020 (UTC)

What about considering this language: It's like Python, but will only work if your program is a disan count program? --None1 (talk) 13:04, 14 November 2023 (UTC)