[Skip Navigation] [CSUSB] / [CNS] / [CSE] / [R J Botting] /[Samples of MATHS] / [maths] / index
[Index] [Contents] [Source Text] [About] [Notation] [Copyright] [Search ]
Sun Sep 25 22:22:21 PDT 2011


    Index of the samples/maths project


      I am using my PQRST framework in this project:
    1. PQRST::= See http://csci.csusb.edu/dick/monograph/01_4.html#PQRST, Purposes [ P.html ] , Qualities [ Q.html ] , Realties [ R.html ] , Systems [ S.html ] , Technologies & Techniques [ T.html ] , and Other [ O.html ] factors.

      Purposes of maths project

        Introduction -- the MATHS language

        MATHS is a language with syntax based on computer languages but semantics provided by mathematics and formal logic. The [ ../../monograph/10.manifesto.html ] (MATHS manifesto) spells out the intent of the language.

        This collection of notes [ ../../maths/ ] are the current defining documents of the language.

        Goals of Project

        1. To make the MATHS tools and language usable by any body on the web.
        2. To open up the defining documents and tools to the Free/Open Source Community.
        3. Ultimately to develop the MATHS web site so that it will improve and grow as a resource for people doing maths and logic as part of developing software, even after I have retired (4..5 years) or died.

        User Stories

        1. A beginer can generate a web page rendered from a MATHS document.
        2. Any body can submit a MATHS document to the owner of the web site.
        3. While creating a MATHS document a user can add a template: subsection, argument, rebuttal, net, PISCO, ... and fill in blanks in the template.
        4. A programmer needs a quick summary of the syntax and semantics of a language can find links and/or MATHS definitions.
        5. A developer needs a model that acounts for a particular part of a domain can search the site to find relevant formal systems, in computer notation.
        6. Members of the core editor group can maintain and improve the structure.
        7. A trustworthy person can edit the content and so improve it.
        8. Someone who is not known to the community can submit new material to trustworthy people who will place it in the site.
        9. People can earn the right to move up the hierarchy from reader, to writer, and to editor.

      . . . . . . . . . ( end of section Purposes of maths project) <<Contents | End>>

      Qualities of maths project

        The Illities

        (Q1): Security,
        (Q2): simplicity, See Q2a and Q2b below and [ T.html#KISS ]
        (Q2a): Simple web technology -- HTML + simple CSS.
        (Q2b): Simple development tools and techniques.
        (Q3): cost=free,
        (Q3a): Avoid proprietary technology,
        (Q4): usable by geeks,
        (Q5): artifacts readable by most.
        (Q6): aim for data not glitz.
        (Q7): easy to code.
        (Q7a): The Minimum Necessary Change at each step.
        (Q8): Low CPU load -- not enough to slow other users.
        (Q9): Keep Disk space within CSE.CSUSB limits.

      Realities of maths project


        There are many pages. Some pages are samples of applications, some are part of a repository of mathematcs, some define the underlying logic (including methods of proof), and some define the notation (Syntax and semantics) used.

        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). [ 001171.html ] (Coding Horror blog , September 23, 2008 "Cross-Site Request Forgeries and You")

        A Group Is Its Own Worst Enemy

        [Skirky03] [ group_enemy.html ]
        1. Social and technical issues are intertwingled: they can not be separated niether does the technical drive the social. The system will have antics -- emergent properties. There will be a formal rules and informal rules.
        2. Members are not just users. There will be an onion structure. Example: reader -> anonymous coward -> named person -> moderator. The Core subgroup love and weed the garden that others wander through (and vandalize?). = Volunteer fire department.
        3. One user = one vote does not work when any wandering visitor can be a user.

        Number of external links

        One page -- the bibliography of softwre development has over 113 distinct sites in "http" URLs.

      Systems of maths project

        Upto September 18th 2008

        Only the owner can update the site, but any reader can submit new materials to the owner for inclusion.

        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 will 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.

        Wait to gather clientele/users


        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

        (Team): Just me [ ../../index.html ] at this time. Long term goal recruit volunteers and students to (1) develop intro, math, logic pages. (2) develop the notation (notn pages), (3) develop more tools and improve current tools.

        (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 ]
           	echo $0: Wrong number of arguments
           	exit 2
           if [ -r $1 ]
           ed - $1 <<ENDIT
           	echo $0: file $1 not readable
           	exit 1

        (PHP+unix): PHP on our server will execute commands in one of four directories.

        1. PHP has been set up to not execute arbitrary scripts and programs.
        2. And PHP and Unix shells will not accept absolute paths.
          1. Talked to systems adminstrator and did some experiments to find the working directory and the PATH used when PHP system() executes:
               system("echo PATH=\$PATH", $retval);
               system("ls /bin");
               system("cat /usr/local/www/data-dist/faculty/dick/bin/cookie", $retval);
               system("sh /usr/local/www/data-dist/faculty/dick/bin/cookie", $retval);
               system("/usr/local/www/data-dist/faculty/dick/bin/cookie", $retval);

          (Close But )

        (Close But )

        (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, ...

          See [ R.html#Number of external links ] which makes this an implausible technique.

        (Close 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

        How to motivate people to use MATHS

        How to motivate people to write MATHS for this site

        How to motivate people to write tools for this site

      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.


      [ ../maths.html ]