Hi,
I was thinking that CSX files and literate programming would go very nicely together for technical blogging. I maintain a C# blog and it'd be great to write technical posts as commented CSX files. I'm rolling around an idea for a project, but I don't want to reinvent the wheel if there's something out there that suits my needs.
Here's an example of the kind of thing I was considering;
/* .Net decimals are a little weird -- the values 12.0m and 12.000m
seem to represent the same value; */
ASSERT(12.0m == 12.0000m);
/* But they aren't quite the same -- they store their decimal precision,
too, which means their string representations are different; */
ASSERT(Convert.ToString(12.0m) != Convert.ToString(12.000m))
/* So here's a safe way to compare the string representations of them; */
string GetSafeDecimalString(Decimal d) {
return string.Format("{0:0000000000000000.0000000000000000}", d);
}
ASSERT(GetSafeDecimalString(12.0m) == GetSafeDecimalString(12.000m));
The idea being to be able to write a blog post entirely in a CSX file, then run a process to output your HTML and guarantee compiling, tested code.
Seems like something other people might have considered -- are there any projects I should know about before I reinvent the wheel?
Thanks,
Steve