This collection of notes [ ../../maths/ ] are the current defining documents of the language.
. . . . . . . . . ( end of section Purposes of maths project) <<Contents | End>>
MATHS documents have many internal and external links. Each theorem has a link to its proof. Each defined term links to its definition. Each name of a mathematical system has a link to its definition.
MATHS is a a source code that can be translated into various mark up languages such a HTML and TeX. The generated HTML takes up twice the disk space as the source code.
Examples: [ 001123.html ] (Coding Horror blog "Designing For Evil", May 2008). [ 001171.html ] (Coding Horror blog , September 23, 2008 "Cross-Site Request Forgeries and You")
Even so there is a bibliography or nearly 4k items on software development and mathematics and logic.
(KISS): The technology used must not be bleeding edge. This includes both
generated pages and the technology used to create them.
[ Q.html#Q2 ]
(locost): It should be free or at least, very cheap.
(PHP): PHP is a well tested preprocessor that fits well into web servers. Runs
on CSE.CSUSB web servers.
(unix): Used standard Unix tools like sed, awk, grep etc. to prototype
tools for translating MATHS to HTML. The next small step
would be to execute mht2html from PHP.
[ Q.html#Q7a ]
(ed): This old Unix editor is stable and unbreakable. It fits
[ Q.html#Q1 ]
and
[ Q.html#Q2 ]
well. For example:
: fix extra slashes injected by PHP
if [ $# -ne 1 -o "x$1" = x ]
then
echo $0: Wrong number of arguments
exit 2
fi
if [ -r $1 ]
then
ed - $1 <<ENDIT
g/\\\\'/s//'/g
g/\\\\"/s//"/g
g/\\\\\\\\/s//\\\\/g
w
q
ENDIT
else
echo $0: file $1 not readable
exit 1
fi
(PHP+unix): PHP on our server will execute commands in one of four directories.
But
<?php
echo("Test<br>");
system("pwd");
echo("<br>");
system("set");
echo("<br>");
system("echo PATH=\$PATH", $retval);
echo("<br>$retval<br>");
echo("<br>");
system("ls /bin");
echo("<br>");
system("cat /usr/local/www/data-dist/faculty/dick/bin/cookie", $retval);
echo("<br>");
echo("$retval");
echo("<br>");
system("sh /usr/local/www/data-dist/faculty/dick/bin/cookie", $retval);
echo("<br>");
echo("$retval");
echo("<br>");
system("/usr/local/www/data-dist/faculty/dick/bin/cookie", $retval);
echo("<br>");
echo("$retval");
echo("<br>");
?>
(HTML_forms): For posting data to PHP.
(AJAX): Asynchronous JavaScript and XML. See KISS above.
(LAMP): the CSE.CSUSB web servers user the Linux+Apache+Preprocessor stack.
Does it have MySQL?
(ruby): is available on lab machines... is it available on the web server?
(Gen): generate pages on demand from MATHS to HTML, or store HTML prepared
when MATHS changes. First choice will reduce disk space
[ Q.html#Q8 ]
by about 60%
[ R.html ]
but
increase the CPU load
[ Q.html#Q9 ]
for each request. A classic Quality tradeoff.
(limit offsite links): -- plausible but feasible.
To protect against evil users allow automatic posting of items with
offiste links limitted to a few safe sites -- example ACM DL, Wikipedia, ...
But
(convert unix2dos): Available on the lab machine and the login server.
Used in mth2html to create ".txt" files from".mth" files.
Reinvented using sed for Web server:
sed 's/$/^M/'Note -- you must actually type "^V^M" = [CTRL v][CTRL M] to insert the "\r" character at the end of the line.