CT Busy Beaver

bearophile bearophileHUGS at lycos.com
Sat Aug 18 16:07:29 PDT 2012


On Reddit I have found a little C++11 program, here a little 
reformatted:
http://ideone.com/Vzkt8

The C++11 program implements a Turing machine at compile time, 
using two compile-time linked lists to represent each half of the 
tape (in such lists the ends handily loop on themselves). And 
then the Turing machine is programmed with a Busy Beaver.

So I have tried to port it to D, but it doesn't work yet, I have 
troubles with the template pattern matching (some programs 
related to this have given me optilink errors, but here the 
problem is different and larger):
http://dpaste.dzfl.pl/3195c63f

In this D version D I have kept the original structure, so I have 
not used two TypeTuples, also because of the loops at the list 
ends.

This D code is not going to be used for practical work. But do 
you know how to fix/improve it?

Bye, and thank you,
bearophile


More information about the Digitalmars-d-learn mailing list