> > Again I have to credit Sebastian Pancratz and Fredrik Johansson here > > for raising the standard in flint. I thought I had been producing > > beautiful code until Sebastian started rewriting some of it for > > me. :-)
I downloaded Flint and looked at the source code and documentation. First, I applaud you on the PDF. It looks very nice and it includes quite a bit of information. I especially liked the hyperlinks to Wolfram's site and the fact that you included a bibliography. The inline mathematics is very useful (a TeX advantage). As an experiment I tried to understand "Bell Numbers", of which I know nothing. Since the algorithm for "bell_number_vec_recursive" is small I can see what is being computed. However, I also see that "bell_number_vec" contains a magic number 7000 as the defining value to split the computation. One advantage of a literate form of the documentation would be the obvious need to explain this number. The pdf simply says that it "Automatically switches..." but not when or why. The hard part of a fully literate document is the need to explain the special "tricks" that make an algorithm fast. Mathematically they might not matter but computational math hinges on the details. Many an algorithm in Sage has been carefully tuned to get speed and it is this careful tuning that makes the algorithm worthwhile. It also makes it obscure. But this tuning includes crucial knowledge that cannot be reverse-engineered and is only known to the author. Eventually the author dies, as has happened with several Axiom authors. If a future maintainer needed to port Flint to run on the ARM or the Apple5 or the GPU/CPU/APU setup what are the critical things to optimize? Is 7000 machine independent? Knowing these details is the difference between a classroom algorithm and a world class one. If I write Bell Numbers in Axiom, does 7000 matter? The reason to favor a fully-embedded literate program is that you can't ignore or hide any implementation detail. The magic number 7000 would cry out for an explanation. Keeping the code in one file and the documentation in another file makes it trivial to skip details. A peer review of a literate program would certainly notice that this was skipped. I am tempted to make a literate paper about bell numbers that is built on your code but I'd obviously make a fool of myself in front of a crowd of number theorists :-) Never the less, a small "pamphlet" on the implementation of Bell Numbers would make a good starting example to critique. I would be willing to provide the tools and techniques if you'd be willing to provide the explanations. Feel free to decline. Tim Daly -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org