This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
The challenge of day 16 is about generating random data using a modified version of a dragon curve (you can find more info on fractal curves like Dragon here : https://en.wikipedia.org/wiki/Dragon_curve).
First you need to generate data in a loop as follows :
Create an initial state with your puzzle input Call the data you have at this point "a". Make a copy of "a"; call this copy "b". Reverse the order of the characters in "b". In "b", replace all instances of 0 with 1 and all 1s with 0. The resulting data is "a", then a single 0, then "b" Repeat until your generated data is equal or longer than 272 digits.


