Live data from Hacker News

Brainfuck interpreter written in the C preprocessor

github.com

1–10 of 36 posts

Re: Brainfuck interpreter written in the C preprocessor

#4
"There has been much speculation on the turing completeness of the C Preprocessor, but I believe this is the first demonstrative proof that the C preprocessor is turing complete. This uses no GCC extensions and other than the rules for macro evaluation the only 'features' it takes advantage of are token pasting and variable argument macros."

Can anyone confirm that this is really the first demonstrative proof of this kind?

Re: Brainfuck interpreter written in the C preprocessor

#8
post #4

"There has been much speculation on the turing completeness of the C Preprocessor, but I believe this is the first demonstrative proof that the C preprocessor is turing complete. This uses no GCC extensions and other than the rules for macro evaluation the only 'features' it takes advantage of are token pasting and variable argument macros." Can anyone confirm that this is really the first demonstrative proof of this…

No.

It is well known that the C preprocessor is not turing complete. Looking in https://github.com/orangeduck/CPP_COMPLETE/blob/master/RECR.... shows us this technique is not turing complete, as these functions define a maximum recursion depth.

Re: Brainfuck interpreter written in the C preprocessor

#9
post #4

"There has been much speculation on the turing completeness of the C Preprocessor, but I believe this is the first demonstrative proof that the C preprocessor is turing complete. This uses no GCC extensions and other than the rules for macro evaluation the only 'features' it takes advantage of are token pasting and variable argument macros." Can anyone confirm that this is really the first demonstrative proof of this…

No. It is well known that the C preprocessor is not turing complete. Looking in https://github.com/orangeduck/CPP_COMPLETE/blob/master/RECR.... shows us this technique is not turing complete, as these functions define a maximum recursion depth.

It is impossible to implement a system without a de-facto recursion depth limit.

Re: Brainfuck interpreter written in the C preprocessor

#10
post #9

Earlier quoted context omitted.

No. It is well known that the C preprocessor is not turing complete. Looking in https://github.com/orangeduck/CPP_COMPLETE/blob/master/RECR.... shows us this technique is not turing complete, as these functions define a maximum recursion depth.

It is impossible to implement a system without a de-facto recursion depth limit.

Recursion depth limit is really a memory limit, so you just need someone to come and install more RAM when you run out in order to obtain de facto infinite memory, hence infinite recursion depth.
Post reply on HN