delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/21/19:31:35

From: ma AT maths DOT uwa DOT edu DOT au (ma)
Newsgroups: comp.os.msdos.djgpp,uwa.general
Subject: Teaching Worldwide More Acceptable Language
Date: 21 Jan 1998 23:52:30 GMT
Organization: The University of Western Australia
Lines: 381
Message-ID: <ma-2201980752550001@mac89.maths.uwa.edu.au>
NNTP-Posting-Host: mac89.maths.uwa.edu.au
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

We understand that lots of participants of this newsgroup are delicated to
education free for all. We also offer something to the world that is  free
for all.

We invite you to give YOUR PROFESSIONAL VERDICT on a new language which is
proposed by a pure mathematician without any background and formal
training in computer science. I do not know what is a syntax tree and its
role in computer language. I never see a sym-table and a hash-table in my
life. The only available tool is my mathematical maturity. As a result of
our cultural difference, it may be impossible for me to understand
something that is obvious to you, e.g. why underscore rather than a blank
MUST be used in identifiers and why some statements are executable but
some are not. As an academic, "how it works", "why it works", readability
and top-down presentation seem to be more important than the speed,
popularity and even reliability. Anyway, YOUR CRITICAL, IMPARTIAL,
PROFESSIONAL COMPARISON OR ASSESSMENT of this new experimental language vs
the old established language of this newsgroup is cordially invited. I am
not an advertising agent and I do not want to mislead your judgement one
way or another. Please support the DEMOCRATIC system and openly cast your
vote on our record. For your convenience, please copy the following and
read it with a browser, e.g. Netscape-3. In the best interest of advancing
global affair, your service to the international community will be greatly
appreciated.

The following is identical to
                   http://www.freeyellow.com/members/twma/index.html

=======================================================
<html><head><title>TWMA-Language-Free-Samples</title>
<body bgcolor="#ffffff" text="#000000">
 
 
<h2><center><Font size="+3">T</font><font size="+1">eaching </font>
<font size="+3">W</font><font size="+1">orldwide </font> 
<font size="+3">M</font><font size="+1">ore </font>
<font size="+3">A</font><font size ="+1">cceptable</font>
<font size="+3">L</font><font size ="+1">anguage</font></center>
</h2>
<center><b>We propose a new computer language for teaching purpose</b></center>

<hr> <a name="top">
<h2>
<center> Learning by Playing </center></a><p>
<center> Highlights of Some Features</center>
</h2><hr><center>There is something for everybody.</center>
<center> Please adjust your browser to 80 columns. </center>
 <center> Use Time-12 for proportional font and Monaco-9 for fixed
font.</center><hr>


<ul><li><a href="#readability"> Readability and Control Statements</a>
<li><a href="#presentation"> New Style of Top-Down Presentation</a>
<li><a href="#nickname"> Nicknames for Generic Data</a>
<li><a href="#tool"> Simple Tool for cgi-programming</a>
<li><a href="#poly"> Polynomials for High-School Kids</a>
<li><a href="#matrix"> Matrices and Eigenvalues for University Students</a>
<li> Syntax and Semantic of Objects are explained in last chapter of our
report even we ran out of time to complete its implementation.
<li><a href="#you"> Opportunity for you</a> as a result of Killing
Research and Suppressing Development in a Free World.</ul>


For further information, 
<a href="http://maths.uwa.edu.au/~ma/twma/twma.htm">
please click here</a>.

<p><a name="readability"><ol><li>Readability : You do not have to be a
professional in order to have an idea of what the following program is
about.

<pre><b>Sample Program </b> <code>
declare condit:good movie=true, good food=true, casino is open=true
enum mon,tue,wed,thur,fri,sat,sun
   //declare integer and assign values from 1 onward
declare integer:my pocket money=100,day=wed,what I have
  while my pocket money > 0
    study day
    case mon..fri;print"working day",day;spend(3)
    case sat;
      if good movie
      then print"watch movie";spend(10);good movie=false
      but good food;print"enjoy food";spend(20);good food=false
      else
        for what I have = my pocket money,2,-10
          if what I have>20
          print"gambling";print what I have;for_nx;print"eat something"
          else print"get out";xfor;print"rob a bank"
          nif
        nfor
      nif
    case sun;print"go to church"
    otherwise day=mon;print"new week";xcase
      print"We just create the eighth day of a week"
    ncase
  another day;pause
  until my pocket money<=0;nwhile

job another day;day=day+1;njob
  job spend(#in;integer:x);my pocket money=my pocket money-x
  print "my pocket money", my pocket money;njob</code> </pre>

There are two conditional statements:
<center>IF-THEN-BUT-XIF-NIF</center> and <center>
STUDY-CASE-OTHERWISE-XCASE-NCASE.</center>  There are three loop
statements: <center> WHILE-XWHILE-WHILE_NX-UNTIL-NWHILE,</center> 
<center> REPEAT-XREPEAT-REPEAT_NX-UNTIL-NREPEAT,</center>  <center>
FOR-XFOR-FOR_NX-UNTIL-NFOR.</center> IF-CASE statements have implicit
block-structures. You can create block structures explicitly with
BLOCK-XBLOCK-NBLOCK. Labels start with $ and a letter followed by letters
or digits ended with a semicolon or end of line.


<p>For further information, 
<a href="http://maths.uwa.edu.au/~ma/twma/twma.htm">
please click here</a>.

<p><a name="presentation"><li>
A huge program should be presented like a book starting with a table of
contents followed by chapters. Each chapter starts with a list of
section-titles followed by contents. Each section begins with its own list
of paragraph-titles followed by contents. This is the programming style
that we should train worldwide mathematics achievers. Observe that
pseudocodes are acceptable statements. Since identifiers and pseudocodes
are just like English, our proposed top-down presentation should be more
acceptable to the commercial community. There are four ways to call upon a
job to be done: by ordered list, by unordered list, by keywords DO, PLEASE
and by name. There are four types of jobs: JOBM for job-macro, JOB for
usual job with side effect, JOBX for job-external without any side effect
and JOBF for job-format-only. Jobs are selected by signatures rather than
their names alone. Similar management is applied to functions as well. All
will be explained in due course.

<pre><b>Sample Program </b> <code>
// Table of Contents of chapters of a book
   1. Declare global variables  // called by ordered list of pseudocodes
   2) make some calculations  // table of contents for chapters
   3> write an impressive report  // write programs with pseudocodes
   quit  // optional only
// Table of Contents of first chapter
   Jobm Declare global variables
      declaration  // called by job-name
      *** look at the inside for training purpose
      **** print resource report  // called by unorder list
   njob   // end of job
// actual content of chapter one
   Jobm declaration;declare integer:a=1,b=2;njob //job-macro
   Job look at the inside for training purpose
      print"looking at master-stack and data section"
   njob
   Job print resource report;print "resource report done";njob
// actual content of chapter two
   Job make some calculations
      declare integer:a=99,x  // local variables a,x
      x=a+b;b=a+x  // side effect on global variable b from calculation
      do your bloody job   // called by DO
      please look at the inside for training purpose//called by PLEASE
   njob
   Job your bloody job;print"do or die";njob
// actual content of chapter three
   Job write an impressive report;print a,b;njob</code> </pre>


For further information, 
<a href="http://maths.uwa.edu.au/~ma/twma/twma.htm">
please click here</a>.

<p><a name="nickname"><li>
It is common practice that the same algorithm is applicable to a variety
of different data types. Consider the following example, the job calculate
is written in terms of nicknames x,y,z in first three lines. It is
applicable to integers in line four and real numbers in line five. Line 6
makes it impossible to use the nicknames x,y,z in order to safeguard any
subsequent usage by mistake. All nicknames can be used again as long as
you write a new nickname statement as in line 8. An important application
of nicknames is to pass huge data structures in and out of jobs as
parameters without making copies.

<pre><b>Sample Program </b> <code> 
<ol><li>   declare nickname:x,y,z
<li>   jobm calculate;print x,y;x=x+y-10*z;y=x-22*z
<li>   print x,y;print;njob  // we do not know what are x,y,z
<li>declare integer:j=-12,k=-34,t=1;nickname x =j,y=k,z=t;calculate
<li>declare real:a=-1.2,b=-3.4,c=0.1;nickname x =a,y=b,z=c;calculate
<li>nickname x,y,z
<li>declare complex: u=-12-12j.,v=-34-34j.,w=1+1j.
<li>nickname x=u,y=v,z=w;calculate</ol></code> </pre>


For further information, 
<a href="http://maths.uwa.edu.au/~ma/twma/twma.htm">
please click here</a>.

<p><a name="tool"><li>
You can print a paragraph of text enclosed by a pair of special brackets
\%\ as shown by the following example.

<pre><b>Sample Program </b> <code> 
Print\%\
The homepage of Teaching Worldwide More Acceptable Language
or TWMA-language is
http://www.freeyellow.com/members/twma/index.html
\%\</code> </pre>


For further information, 
<a href="http://maths.uwa.edu.au/~ma/twma/twma.htm">
please click here</a>.

<p><a name="poly"><li>
This language is for high-school kids. It can help them to find rational
roots of a polynomial with integer coefficients. Therefore
Teaching-Worldwide-More-Acceptable Language should be included as part of
high-school curriculum.

<pre><b>Sample Program </b> <code> 
     declare poly[4] of integer:f   // degree 4, integer coefficients
     f=poly of integer[12,-4,-5,2]  // degree 3 but 4 coefficients
     print f   // coefficents are 0,12,-4,-5,2  in decending order
     print root(f)   // print any rational root of f if it exists
     declare real: x
     x=root(f,1)  // comma 1 is to list all rational roots on screen
     print x;pause
     f=poly integer[4,-12,-135,486];print f
     print root(f)   // print any root of f
     declare integer:j=root(f,1)  // list all rational roots on screen
     print j</code> </pre>

<pre><b>Sample Program </b> <code> 
     declare poly[1] integer: x=poly integer [1,0]  // monomial
     declare poly[3]integer#2:f=poly integer [1,2,3,4], //comma=more
     g=x**3+2*x**2+3*x+4;print f,g</code> </pre>

<p>For further information, 
<a href="http://maths.uwa.edu.au/~ma/twma/twma.htm">
please click here</a>.

<p><li>The language is actually a useful tool for the high-school kids
because synthetic division is part of the language. The following is to
calculate (x**3+2*x**2+3*x+4)/(x-a). We hope this language is more
acceptable to the worldwide high-school community. It works for complex
polynomials as well. For more example, use your Editor to search keywords
such as syndiv from the file : auto. We hope that high-school teachers all
over the world will support this language.

<pre><b>Sample Program </b> <code> 
     declare poly[3]integer:f=poly integer[1,2,3,4] // OF, optional
     declare poly[2]real:Quotient   // degree 2, real coefficients
     declare real:a=1.2,remainder=-12.3
     syndiv f,a,Quotient,remainder;print f,a
     print Quotient,remainder</code> </pre>


For further information, 
<a href="http://maths.uwa.edu.au/~ma/twma/twma.htm">
please click here</a>.

<p><a name="matrix"><li>
To make it more acceptable as a tool to university students, matrix
algebra is included as shown by the following example.

<pre><b>Sample Program </b> <code> 
     declare matrix[2,2]:a,b     // 2 by 2 matrix of real numbers
     a=idmat(2);b=umat(2);print a,b   //identity matrix, unit matrix
     b[2,1]=0; print b, inverse(b), det(b)    //change entries of b,
     b=(2*a*2-6*b)*b/2;print b   // standard matrix operations
     declare integer:u=1,v=2,x=6,y=0,z=-6;print u,v,x,y
     a=matrix [(1,1),(0,1)]
     b=a**u;print b;b=a**v;print b;b=a**x;print b
     b=a**y;print b;b=a**z;print b  //negative exponent</code> </pre>

<p>For further information, 
<a href="http://maths.uwa.edu.au/~ma/twma/twma.htm">
please click here</a>.

<p><li> Reducing augmented matrix to echelon form is the standard way to
find inverse of a square matrix. With dummy syntax, a student can actually
see exactly how a matrix is reduced to echelon form and how a systems of
linear equations is solved. Because it is so easy to use, this language
should be more acceptable for teaching purpose of linear algebra. Once a
matrix is reduced to echelon form, its rank is just the number of nonzero
rows and nullity the number of zero rows. Therefore the syntax should
become part of both high-school and university curriculum for teaching
worldwide mathematics achievers. Our sine-cosine functions can take
degrees and complex numbers as arguments. This would make the electrical
engineering students happier. Examples can be found from the file : auto
by searching the keywords such as sinh, asin, log, etc.

<pre><b>Sample Program </b> <code> 
     declare matrix[3,3]integer:a,b
     declare matrix[3,3]real:c
     declare matrix[3,3]real:d
     a=matrix integer [ (1,2,-2), (1,1,-2), (-3,-5,7) ]
     b=matrix integer [ (3,4,2), (1,-1,0), (2,1,1) ]
     c=idmat(3);d=zmat(3);print c,d,a*b   // zero matrix, b=inverse(a)
     declare matrix[3,6]real:x=augm(a,c)  // augmented matrix
     reset round=1;print x   // round all real to integers within delta
     echelon#3,x;print x     //echelon to first three columns only
     d=submat(x,1,4)  //submatrix starting from row 1, column 4
     print d;print b   //standard way to find inverse in linear
algebra</code> </pre>

<pre><b>Sample Program </b> <code> 
     declare integer:determinant;declare matrix[3,4]integer:A
     a=matrix integer[(1,2,-3,4),(-2,-6,10,-14),(1,5,-12,22)]
     echelon A*, determinant   // * display all operations on screen
     print a,determinant
     print "Solution of linear equations given by original A is"
     print a[1,4],a[2,4],a[3,4]</code> </pre>

<pre><b>Sample Program </b> <code> 
     declare real:d;declare matrix[3,4]real:A
     a=matrix integer[(1,2,-3,4),(-2,-6,10,-14),(1,5,-12,22)]
     echelon A*, d;print a,d;print
     print"triple row 3, completely different path of partial pivoting"
     a=matrix integer[(1,2,-3,4),(-2,-6,10,-14),(3,15,-36,66)]
     echelon A*, d;print a,d</code> </pre>

<p>For further information, 
<a href="http://maths.uwa.edu.au/~ma/twma/twma.htm">
please click here</a>.

<p><li>The characteristic polynomial of a matrix is a standard function.
This together with root-function allows us to find all rational
eigenvalues of an integer matrix. This is why every university student
should use this tool in their studies. If you are a student, please tell
your classmates how this language makes life easier for you. If you are an
instructor, please write a textbook on this language. If you are a
developer, a worldwide educational market is waiting for your product of
fast compilers. We have common goal, that is to advance the teaching of
worldwide mathematical affair. Please join the band wagon or you might be
left behind. You do not need any approval in order to write a textbook or
a dictionary for English language. You do not have to consult anybody and
do not have to pay any fee in order to write textbook in twma-language or
to construct commercial compilers for this language. Technical description
of twma-language will be presented later. Right now, it remains to be part
of an advertising campaign.

<pre><b>Sample Program </b> <code> 
     declare poly[3]integer:f
     f=charp(matrix integer[(5,6,2),(0,-1,-8),(1,0,-2)])
     print f;print "All rational eigenvalues are listed below"
     print root(f,1)  // ,1 is to list all rational roots on screen</code>
</pre>

For further information, 
<a href="http://maths.uwa.edu.au/~ma/twma/twma.htm">
please click here</a>.

<p><li>All internal structures can be seen by ASK-statement or
TWMA-statement. Objects are presented in a simple way that is easy to
understand. Therefore it is a good teaching tool but you have to find them
out yourself.

<p><a name="you"><li>
Without your support, this language will NOT be able to survive in the
future because the AUTHORITY of this corner of the FREE (??) world has
ordered me to abandon this project even it is under the umbrella of
ACADEMIC FREEDOM(??). Please support the principle :<p>
<center><b>Of the People, By the People</b> and <b>For the People</b> .
</center> <p> Here, people means your personal effort. Help your friends
to use this new tool. Teach a course on this new language. Write a
textbook for the high-school kids and/or university students. Sell your
compilers to the professionals. The market is out there for you to
conquer. Equal opportunity is hereby open to everybody all over the world.

</ol>

For further information, 
<a href="http://maths.uwa.edu.au/~ma/twma/twma.htm">
please click here</a>.

<hr><a href="#top"><center>Goto Top of This File</center></a>

</body></html>
=======================================================

-- 
======================
ma AT maths DOT uwa DOT edu DOT au
This article reflects my personal opinion only.
======================

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019