I weirdly love reading about other people's workflow. This is really cool thanks for sharing.
One issue I have with literate programming is that its difficult enough to write code, now you have to worry about writing code in the middle of writing prose. For that reason I prefer to just have all my code output a bunch of latex files so I can separate the code-writing from the paper-writing. Which I guess is against the philosophy of literate programming as a whole...
How did you get around this? Do you share the same frustration that you are constantly being distracted by one or the other?
Julia turns out to be a very nice language for problems like this. Many of the algorithms end up looking very much like the pseudocode from the original paper. We can use unicode as well, which makes a lot of the math (like gradient symbols) easier to read. We drop the type annotations to make it more legible. "Real" implementations could definitely improve what we have in terms of error checking and efficiency improvements, but we optimized for understanding and clarity.
Very often getting the figures to generate properly helped us catch mistakes in the code. I usually did this in a Jupyter notebook, because I can iterate there a lot faster than making a small in the book source and running the compilation process there.
I guess we didn't really have to get around the problem - the algorithm was of principle importance and then we had to figure out how to best produce figures for it.
One issue I have with literate programming is that its difficult enough to write code, now you have to worry about writing code in the middle of writing prose. For that reason I prefer to just have all my code output a bunch of latex files so I can separate the code-writing from the paper-writing. Which I guess is against the philosophy of literate programming as a whole...
How did you get around this? Do you share the same frustration that you are constantly being distracted by one or the other?