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
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.
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/\Τ<sub>\Ε<\/sub>\Χ/g
s/\\alpha/\α/g
...
}'and I had to "Destructure" it and introduce a goto:
sed '/^\.As_is/bignore
s/\\TeX/\Τ<sub>\Ε<\/sub>\Χ/g
s/\\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:
.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.
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...
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
I hope to start a new blog to track progress... and I have to decide where
it fits this website. More later.
Glossary
. . . . . . . . . ( end of section Sample Project Blog -- Sabbatical 2008 -- Improving MATHS) <<Contents | End>>