This collection of notes
[ ../../maths/ ]
are the current defining documents of the language.
Goals of Project
. . . . . . . . . ( end of section Purposes of maths project) <<Contents | End>>
Qualities of maths project
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.
Some can not be trusted to use the pages as planned
Evidence: every week or so someone submits a piece of HTML
with an invalid addres and irrelevant subject and links to
porn, advertising, drugs and other non-mathematical stuff.
Examples:
[ 001123.html ]
(Coding Horror blog "Designing For Evil", May 2008).
A Group Is Its Own Worst Enemy
[Skirky03]
[ group_enemy.html ]
Even so there is a bibliography or nearly 4k items on software development
and mathematics and logic.
September 19th 2008
A form will allow the generation of an HTML page for the user.
The form will be able to add templates in MATHS.
September 25th 2008
A form will allow the generation of an HTML page for the user, and a
copy of the MATHS source can be sent to the owner. To be published the
submitter must include their EMail address and a nick-name for
use on the site. Work is credited to the submitter via the nick-name.
Advertize
Wait to gather clientele/users
Next?
Some limitted form of auto-submission by those who have proved
themselves. New materials are creditted to
the person.
Technologies and Techniques of maths project
(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
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.
Other Factors in the maths project
Log of activities
Each time I regenerate an HTML file or compile a source file
my "Quickie" tool summarizes the changes in a file ".Q.log"
which is linked to
[ log.txt ]
and published as part of this site.
Blog
[ ../maths.html ]