[Skip Navigation] [CSUSB] / [CNS] / [Comp Sci & Eng Dept] / [R J Botting] / [Samples] / maths
[Index] [Contents] [Source Text] [About] [Notation] [Copyright] [Comment/Contact] [Search ]
Sun Oct 5 17:32:00 PDT 2008

Contents


    Sample Project Blog -- Sabbatical 2008 -- Improving MATHS

      2008-10-05 Sun Oct 5 17:10 Updated Systems and Technologies

      I've just changed the description of systems [ maths/S.html ] to date the systems as achieved.

      Also added a technique/tool [ maths/T.html#unix2dos ] for converting .mth (Unix) files into .txt (DOS) files for those servers that don't have the Gnu unix2dox command.

      2008-09-19 Fri Sep 19 13:09 Ready for Brave Beta Testers

      Go to [ ../hole.html ] and send me your thoughts.

      2008-09-19 Fri Sep 19 12:09 m2h works

      For a whiel the m2h script output nothing.... but while walking to get some tea I figured out that the web server couldn't find one of the most useful programs that I have ever developed. It is called br and it has the function of br-eaking lines along word boundaries, if possible. It was designed using a variation of Jackson Structured Programmig before ANSI C existed. The documentation is here [ br.d.html ] and you can get a copy of the C source code from [ ../tools/br.c ] , enjoy!

      Now all I have to do is make PHP create a temporary foo.mth file and pass it to fix.slashes and m2h to present to the user the HRML rendering of their submission.

      2008-09-18 Thu Sep 18 14:09 Scream of trivial triumph

      It turns out that I was working in the wrong 'bin' directory and had mistyped the permissions so that the server couldn't execute the "fix.slashes" command.

      The correct directory is obscured because PHP sees a different directory structure to a logged-in user running a shell...

      I have been here and done this before.

      2008-09-18 Thu Sep 18 13:09 Struggling with PHP--Shell

      Currently I've got PHP to run my "cookie" shell script OK, but the "fix.slashes" script is not executing. Need inspiration to see what stupid assumption I am making.

      Next step -- create a cut down version of mth2html called 'm2h` that works on a test file tester.mth.

      Then use PHP to create a tmp file ready for m2h.

      2008-09-12 Fri Sep 12 15:09 How to remove magic slashes

      PHP inserts magic slashe in front of quotation marks in incoming data in an attempt to thwart SQL injection and other evil attacks. These can also bite shell scripts -- an adde quote allows the user have any shell commands they like executes.

      However the venerable ed editor can not be tricked into executing the file it is editting, by data in that file. And so the safest(Q) technique (T) is to use a script that calls an ed command.

      Here is fix-slashes


         : fix extra slashes injected by PHP
         if [ $# -ne 1 -o "x$1" = x ]
         then
         	echo $0: Wrong number of arguments
         	exit 2
         fi
         if [ -w $1 ]
         then
         ed - $1 <<ENDIT
         g/\\\\'/s//'/g
         g/\\\\"/s//"/g
         w
         q
         ENDIT
         else
         	echo $0: file $1 not writable
         	exit 1
         fi

      2008-07-31 Thu Jul 31 16:07 Problem with PHP and UNIX resolved

      [ maths/T.html#PHP+unix ]

      2008-06-25 Wed Jun 25 10:06 Problem with PHP and Unix

      [ maths/T.html#PHP+unix ]

      2008-06-04 Wed Jun 4 06:06 Added Qs and Ts

      See [ maths/T.html ] , [ maths/Q.html ] , and [ maths/log.txt ] for details.

      Spent a week studying [Weber05] on "The Success of Open Source". Which fits well with Shirky and "Coding Horror" below.

      Consequence: confirmed that a email+reflect back system is the best next step.

      2008-05-30 Fri May 30 14:05 Many small changes

      In particular include the fact that the current bibliography of software engineering has links to more than 100 different hosts. [ maths/index.html ]

      2008-05-30 Fri May 30 12:05 Evil that men do

      Added examples: [ 001123.html ] (Coding Horror blog "Designing For Evil", May 2008). to [ maths/R.html ] (Realitites of project).

      2008-05-28 Wed May 28 18:05 Insight into how social web sites work

      Just spent the afternoon studying a wise paper on the design of technology to support conversations and how groups actually work.

      Shirky03

      1. Clay Shirky
      2. A Group Is Its Own Worst Enemy
      3. ETech (Apr 2003 ) + Published July 1, 2003 on the "Networks, Economics, and Culture" mailing list. [ group_enemy.html ]
      4. =TALK =HISTORY WWW/NET SOCIAL GROUP PEOPLE CULTURE WEB2.0 TEAM
      5. Refers to W.R. Bion: "Experiences in Groups": Groups of people become both collections of individuals and a self-coordinating entitiy. Therapeutic groups tend to: talk sex, identify external enemies, and religiously venerate something. Need for structure for groups to work. In particular rules for creating rules...
      6. Examples of BBSs, Usenet, .... where open free group is invaded.
      7. Therefore need structure in social systems.
      8. Technology (TCP/IP, WiFi, IM, Mobile phones, ...) now lets all people be online together.
      9. Example. Ito's Conference call moderated on chat with wiki for references.
      10. For a given technology -- most groups fail!
      11. Accept:
        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 -> anonimous coward -> named person -> moderator. The Core subgroup love and weed the garden that others wander through (and vandalize?). = Volunteer fire department.
          One user = one vote does not work when anybody can be a user.

      12. Things to design for
        1. Give members a handle -- stable local name. So they get a reputation.
        2. Make a simple way for behavior to be visible -- who is in good standing?
        3. Make it difficult to enter the core subgroups. The group is the real user!
        4. Make the communications scale. Encourage a small world structure. Many linked small groups.

      2008-05-21 Wed May 21 09:05 Tweaked the infrastructure

      [ maths/ ]

      2008-05-20 Tue May 20 19:05 Technology exploration

      This morning I discovered a difference between the 'sed' available in our labs and office machines, and the login server vs the 'sed' on our web server. My plan is to initially reuse the source code and much of that uses the UNIX Stream EDitor -- -- --(sed)

      The code that works outside the web server looks like this

       sed '/^\.As_is/!{s/\\TeX/\&Tau;<sub>\&Epsilon;<\/sub>\&Chi;/g
       s/\\alpha/\&alpha;/g
       ...
       }'
      and I had to "Destructure" it and introduce a goto:
       sed '/^\.As_is/bignore
       s/\\TeX/\&Tau;<sub>\&Epsilon;<\/sub>\&Chi;/g
       s/\\alpha/\&alpha;/g
       ...
       :ignore'

      Please don't tell me to use Perl.

      I'm thinking about using a variation of PArnas's Display concept where requirements, designs, the properties of machines are all shown at once, but kept separately....

      2008-05-16 Fri May 16 10:05 Infrastructure -- New directory -- samples/maths

      [ maths/ ]

      2008-05-15 Thu May 15 17:05 Blog Started -- Copying items from main blog

      I've decided that I need to track my thinking about MATHS and developing its tools separately to to my regular blog of reading. The following entries are ripped out of the normal blog.

      2008-05-13 Tue May 13 14:05 Requirments vs Technologies

      Meanwhile -- working on requirements and the available technologies for my sabbatical project, and sorting out leaks in (1) my accounting and (2) a bath room tap. Also reviewing the syntax and semantics of documentation in my MATHS language -- [ maths/notn_13_Docn_Syntax.html ] [ maths/notn_14_Docn_Semantics.html ] [ maths/notn_15_Naming_Documentn.html ] etc. .

      2008-05-12 Mon May 12 14:05 YAML -- XML considered harmful

      My favorite blog just sent me an excellent article [ 001114.html ] which says something that I have been thinking ever since XML was invented -- that it may not be the best solution for all your data encoding needs. As evidence the author gives examples of YAML [ samples/languages.html#YAML ] which are both easier to read and still 99% unambiguous.

      Like my own MATHS language it use white space to indicate structure. But it goes further by having no open+close bracketing syntax. It is all done by indentation. Much the same way CODIL did (does?).

      I'm tempted to formalize YAML into my MATHS language as a long format for complex objects:

    1. CIRCLE( center=> POINT( x=>1, y=>2 ), radius => 10 )
       .Open.YAML
           center:
              x : 1
              y : 2
           radius : 10
       .Close.YAML

      But this will need some thought about current features of MATHS and how simple implementation might be. Can it be done with the UNIX standard tool kit -- sed/auk/...?

      2008-05-09 Fri May 9 17:05 Sabbatical Project -- MATHS

      My sabbatical project is not making much progress. The next post is typical of the reading that I have been doing that indicates that there may not be a market for a simple, formal notation for mathematics -- even if designed to have a lot in common with programming languages. The language exists [ maths ] and has stabilized over several years personal use. My project is to add a new feature heading in the direction of a wiki.

      In the project I was hoping to move in the direction of a wiki-style site that used the language with a lot of people contributing information, notes, samples, and so on. Yesterday I looked into a "PHP Phrasebook". It is full of warnings about the bad things can do if they supply data and some of the things you can do to avoid them. I knew about the risk of passing HTML code with "<script>" tags and have (for years) translated HTML-special symbols in MATHS into entities on HTML pages.

      What I had not thought about is that URLs can not be trusted. I'm quite paranoid about clicking on links and attachments for example in EMail. But I'm starting to wonder if I can trust links in the WikiWikiWeb and the Wikipedia any more.

      This is fairly typical of requirements... a desirable feature comes with a poison pill. It is also typical that you discover the poison pill after the project is well under way. It is also an example of a negative requirement -- something that must not be possible.

      MATHS Project Features

      1. (REQ1): Users should be able to edit MATHS web pages.
      2. (REQ2): Users must not be able to include links to illegal and/or malicious URLs.
      3. (NAT1): Some people attempt to include illegal and malicous links in my pages.
      4. (above)|-Anonymous users may need to have their changes vetted before inserting.
      5. (above)|-Untrusted users may be limited to local links.
      6. (above)|-There may be away to join a group of trusted users who will get full access to the system
      Note: In the above I distinguish requirements (labeled REQn) from known facts (NATn). This comes from the SCR project and Michael A Jacksons recent publications.

      Contact me if you have an thoughts.

      2008-05-05 Mon May 5 13:05 Software Reliabillity Probabillity etc

      I've made some small improvements to some pages introducing my MATHS language: [ ../maths/intro_records.html ] showing how to describe structures with optional and multiple parts. For example to state that a cat has 4 legs...
    2. CAT::=Net{ cat: $ LEG ^ 4 ,...}.

      2008-03-24 Mon Mar 24 17:03 Sabbatical Next Quarter

      I've just posted my grades for the Winter quarter so I'm ready to take a break (taxes + a trip?).

      Next quarter I will be on sabbatical. This is a long tradtion in Universities. I guess it is assumed that after 7 years of teaching you will need a break to get your perspective and energy back. In CSUSB you have to apply and the aplication includes a form defining the project you plan to carry out on the sabbatical. Here is the short description


        To develop software and a web site that enable other computer scientists to experiment with and use my MATHS language. The software will enable the creation of linked, mathematical, and searchable documentation in HTML, XML, and ASCII.

      Here [ sabbatical.html ] are the details.

      I hope to start a new blog to track progress... and I have to decide where it fits this website. More later.

      Glossary

    3. MATHS::= See http://csci.csusb.edu/dick/maths/, a language for semiformal documentation including ontologies, logics, conceptual models, specifications, and algorithms that I also use for weblogs, essays, lecture notes, etc. etc.

    . . . . . . . . . ( end of section Sample Project Blog -- Sabbatical 2008 -- Improving MATHS) <<Contents | End>>

End