A font for some experiments in computing

A central location highlighting fonts created with FontCreator and/or Scanahand. Post information about your fonts here.
William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

A font for some experiments in computing

Post by William » Tue Sep 02, 2008 2:27 pm

Supplementary note of 17 June 2010

There have been various changes as development has proceeded.

Many of the posts that follow are now just a record of what happened at the time.

If arriving here for the first time, please fast-forward to posts from the end of May 2010 and later.

viewtopic.php?p=13230#p13230

The following post contains a link to download the QPIOC009.TTF file, which file contains the font being used for experiments as at 17 June 2010.

viewtopic.php?p=13288#p13288

William Overington

17 June 2010

The original post follows the next line.
----
Some readers might like to have a look at a font which I am producing.

It is derived from a copy of my Poetry font.

The font has 48 glyphs in the Private Use Area which represent the programming items for an experimental computing system.

I have completed the artwork for 29 of the glyphs. The following is a link to the most recently completed development stage font.

http://www.users.globalnet.co.uk/~ngo/PPROC005.TTF

Also, there is a typecase_ pdf.

http://www.users.globalnet.co.uk/~ngo/t ... 5_test.pdf

Here is some information about the programming model.

====

Programming model.

Registers ai, hi, p, q, x, y, j, r, g, b.
Memory array mi[1..1023].

The register q is of type Boolean.
All of the other registers are of type integer.
Each item of the memory array is of type integer.

Use text for characters as follows.

U+EC11 if{1}
U+EC21 then{1}
U+EC31 elsif{1}
U+EC41 else{1}
U+EC51 endif{1};

U+EC12 if{2}
U+EC22 then{2}
U+EC32 elsif{2}
U+EC42 else{2}
U+EC52 endif{2};

*

U+EC70 start;
U+EC7E halt;
U+EC7F finish;

U+ECA1 while{1}
U+ECB1 do(1}
U+ECC1 endwhile{1};

U+ECA2 while{2}
U+ECB2 do{2}
U+ECC2 endwhile{2};

*

U+ED10 ai:=0;
U+ED11 ai:=ai+hi;
U+ED12 ai:=ai-hi;
U+ED13 ai:=ai*hi;
U+ED14 ai:=ai/hi;

U+ED1A hi:=0;
U+ED1B hi:=10*hi+p;

*

U+ED1C j:=hi;

U+ED1E mi[j]:=ai;
U+ED1F hi:=mi[j];

*

U+ED31 q:=ai>0;
U+ED35 q:=ai<0;

U+ED3F q:=not q;

*

U+ED80 p:=0;
U+ED81 p:=1;
U+ED82 p:=2;
U+ED83 p:=3;
U+ED84 p:=4;
U+ED85 p:=5;
U+ED86 p:=6;
U+ED87 p:=7;
U+ED88 p:=8;
U+ED89 p:=9;

*

U+EF71 x:=ai;
U+EF72 y:=ai;
U+EF73 r:=ai;
U+EF74 g:=ai;
U+EF75 b:=ai;

U+EF77 putpixel(x,y,r,g,b);

U+EC.. is for control structures of the program.
U+ED.. is for operations upon data.
U+EE.. is for events.
U+EF.. is for functions and graphics.

====

The processor is intended to be used for producing graphics and diagrams. The idea is that the software could be encoded as Unicode characters in a text file. The software would run in a "sandbox" situation. The arrayized if and while statements mean that the program does not need to be compiled, it could run interpretively as each control word would "know" of which level of nesting it is a part.

The system is designed so that if experiments are successful then the system could hopefully be expanded in a later version, adding repeat{1} until{1} endrepeat{1}, using {3}, {4} and so on for greater levels of nesting of control structures, using other "second letter" choices in identifier names for floating point variables, complex numbers, quaternions, characters and strings and adding events, functions and function calling.

William Overington

2 September 2008
Last edited by William on Thu Jun 17, 2010 6:10 pm, edited 1 time in total.

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Post by William » Wed Sep 03, 2008 9:11 am

I have now completed the font and I have uploaded copies of the font and of a typecase_ pdf to the web.

http://www.users.globalnet.co.uk/~ngo/PPROCESS.TTF

http://www.users.globalnet.co.uk/~ngo/t ... cessor.pdf

There is no software running system implementing this processor at present. I am hoping that publication of the font, the typecase_ pdf and these notes will lead to a software running system being produced. References to the running system in the following notes are theoretical and do not refer to any implemented software. At present I cannot myself produce the running system for the processor.

The if statements are intended to work as follows.

if{1} then{1} elsif{1} then{1} elsif{1} then{1} else{1} endif{1};

The if{1} does nothing. It is just for assisting people to understand the layout of a program. Usually the value of q will be computed by instructions after the if{1}.

A then{1} acts on the value of q when the then{1} is encountered. If q is true then then{1} does nothing; if q is false, then the running system searches forward for the next occurrence of any one of elsif{1}, else{1}, endif{1}; and then continues obeying instructions from the instruction immediately after the elsif{1}, else{1} or endif{1};.

If the elsif{1} is obeyed then the running system searches forward for the next occurrence of endif{1}; and then continues obeying instructions from the instruction immediately after the endif{1};. Usually the value of q will be computed by instructions after the elsif{1}.

If the else{1} is obeyed then the running system searches forward for the next occurrence of endif{1}; and then continues obeying instructions from the instruction immediately after the endif{1};.

If the endif{1}; is obeyed, then it does nothing.

Similary for the if{2} then{2} elsif{2} then{2} elsif{2} then{2} else{2} endif{2}; sequence.

The {1} set and the {2} set operate independently of each other, so that nesting is possible.

The while statements are intended to work as follows.

while{1} do{1} endwhile{1};

The while{1} does nothing itself, though it is searched for when an endwhile{1} is obeyed.

A do{1} acts on the value of q when the do{1} is encountered. If q is true then do{1} does nothing; if q is false, then the running system searches forward for the next occurrence of endwhile{1}; and then continues obeying instructions from the instruction immediately after the endwhile{1};.

If the endwhile{1}; is obeyed then the running system searches backward for the previous occurrence of while{1}; and then continues obeying instructions forward from the instruction immediately following the while{1}.

Similary for the while{2} do{2} endwhile{2}; sequence.

The {1} set and the {2} set operate independently of each other, so that nesting is possible.

Given that x, y, r, g, b represent x, y coordinates from the top left corner going right and down respectively as is usual with graphics programs and colour components red, green and blue going from 0 to 255 as is usual with many graphics programs, hopefully this thread contains enough information for some interesting experiments.

William Overington

3 September 2008

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Post by William » Fri Sep 12, 2008 9:19 am

I have this morning produced a pdf containing a program for the processor.

This program is experimental as the processor has not been implemented at the time of writing the publication and has thus not been tested.

http://www.users.globalnet.co.uk/~ngo/p ... am_001.pdf

I produced the pdf by starting a new publication using the Serif PagePlus X2 desktop publishing program.

I opened the typecase_processor.pdf using Adobe Reader. I copied and pasted from the typecase_processor.pdf publication to a text frame within the publication within Serif PagePlus X2, reformatting the text to the Processor font after each pasting operation, the Processor font being installed on the computer. I did not use the Insert Symbol facility of PagePlus X2 at all during the production of this publication.

The program is represented using 33 characters of 17 different codepoints from the Unicode Private Use Area.

The program is intended to add a single red pixel to a display at a point (x=10, y=20) measured from the top left corner of the display.

The program could potentially be obeyed from various sources, for example direct from the pdf, from a Unicode text file in UTF-16 format or from an HTML page.

William Overington

12 September 2008

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Sat Feb 21, 2009 6:00 pm

I am hoping that one day a processor will be added to regular Unicode.

If that happens, then it would be added into a high plane of Unicode.

So, this is an experiment to produce a version of the present experimental processor in plane 15, in the hope that experience can be gained.

I am naming the processor as the 7001 (in speech, please say "seven thousand and one").

Plane 15 is chosen rather than plane 16 so that there is the possibility that the software for the 7001 processor, even while in a Private Use Area version, could be encoded in an Ultracode label at some future time: this is because Ultracode includes the following.
Encodable character set: Complete 20-bit character subset of ISO 10646-1, including the 16-bit Basic Multilingual Plane (=Unicode 2.0 character set). Also includes ISO/IEC 4873 and ISO 8859 series of 8-bit character sets, as well as the specific character sets of Code 39, Code 49, Code 93, Code 128, Codabar, Interleaved 2 of 5, UPC/EAN, UCC/EAN-128, and Codablock F.
http://www.aimglobal.org/standards/symb ... erview.asp

The font includes copies of the 48 software glyphs, though modified with a low underlining on each of them. Each such glyph is mapped to a codepoint that is in plane 15. An example perhaps explains the method best.

In the plane 0 version, there is an item as follows.

U+EC11 if{1}

In the new font, there is also an item as follows.

U+F7C11 if{1}

In effect, one changes the U+E to U+F7 in each case.

I have left the original 48 glyphs for software in the font. This is to facilitate tests and experiments. There is no intention that items from the two sets would be intermixed in any one experiment. The underlining is simply as a convenient way to indicate which glyph is being used in any particular test.

I am currently thinking that if a processor is encoded in regular Unicode then perhaps it could be encoded in plane 12. This would mean that Unicode code points would begin U+C and have four hexadecimal characters after the U+C.

If a processor is encoded in regular Unicode then a processor far more comprehensive than the 7001 would be need to be developed.

I do not have the knowledge, skills and equipment to develop such a processor by myself: however, I feel that an open project with the participation of many people, both individuals and people representing organizations, could achieve a magnificent result.

Such a processor could be the result of extending the 7001, such as by adding facilities for floating point variables, characters, strings, complex numbers and quaternions and event handlers and so on; or maybe a fresh start from a blank sheet of paper could be made if that is what people prefer.

The software produced using the font can be saved to a file using the Unicode Text Document format from WordPad, at least on the xp professional PC which I am using.

The U+F7C11 codepoint can be entered into WordPad, at least on the xp professional PC which I am using, using Alt 1014801. In order to display the glyph the Processor 7001 font needs to be installed. Some readers may like to know that I use the font at 24 point when carrying out tests. However, that use of 24 point is not essential as no details of the font are stored in the Unicode Text Document.

I feel that I have made an important step forward with the publication of this font.

Whether a processor will ever be encoded into regular Unicode is a question for the future.

Readers are invited to study the font and to experiment with producing some small experimental programs each stored in a Unicode Text Document.
PROC7001.TTF
The Processor 7001 font, version 1.01 of 21 February 2009.
(109.96 KiB) Downloaded 299 times
William Overington

21 February 2009

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Mon Feb 23, 2009 9:54 am

Here are the codes for the 7001 processor. The Alt codes are shown so that items can be entered using an Alt code in WordPad. I usually use the Processor 7001 font at 24 point, but as saving the keyed items is to a Unicode Text Document and that does not preserve the point size (nor the font name), that point size is just my personal preference.

U+F7C11 if{1} Alt 1014801
U+F7C21 then{1} Alt 1014817
U+F7C31 elsif{1} Alt 1014833
U+F7C41 else{1} Alt 1014849
U+F7C51 endif{1}; Alt 1014865

U+F7C12 if{2} Alt 1014802
U+F7C22 then{2} Alt 1014818
U+F7C32 elsif{2} Alt 1014834
U+F7C42 else{2} Alt 1014850
U+F7C52 endif{2}; Alt 1014866

*
U+F7C70 start; Alt 1014896
U+F7C7E halt; Alt 1014910
U+F7C7F finish; Alt 1014911

U+F7CA1 while{1} Alt 1014945
U+F7CB1 do(1} Alt 1014961
U+F7CC1 endwhile{1}; Alt 1014977

U+F7CA2 while{2} Alt 1014946
U+F7CB2 do{2} Alt 1014962
U+F7CC2 endwhile{2}; Alt 1014978

*

U+F7D10 ai:=0; Alt 1015056
U+F7D11 ai:=ai+hi; Alt 1015057
U+F7D12 ai:=ai-hi; Alt 1015058
U+F7D13 ai:=ai*hi; Alt 1015059
U+F7D14 ai:=ai/hi; Alt 1015060

U+F7D1A hi:=0; Alt 1015066
U+F7D1B hi:=10*hi+p; Alt 1015067

*

U+F7D1C j:=hi; Alt 1015068

U+F7D1E mi[j]:=ai; Alt 1015070
U+F7D1F hi:=mi[j]; Alt 1015071

*

U+F7D31 q:=ai>0; Alt 1015089
U+F7D35 q:=ai<0; Alt 1015093

U+F7D3F q:=not q; Alt 1015103

*

U+F7D80 p:=0; Alt 1015168
U+F7D81 p:=1; Alt 1015169
U+F7D82 p:=2; Alt 1015170
U+F7D83 p:=3; Alt 1015171
U+F7D84 p:=4; Alt 1015172
U+F7D85 p:=5; Alt 1015173
U+F7D86 p:=6; Alt 1015174
U+F7D87 p:=7; Alt 1015175
U+F7D88 p:=8; Alt 1015176
U+F7D89 p:=9; Alt 1015177

*

U+F7F71 x:=ai; Alt 1015665
U+F7F72 y:=ai; Alt 1015666
U+F7F73 r:=ai; Alt 1015667
U+F7F74 g:=ai; Alt 1015668
U+F7F75 b:=ai; Alt 1015669

U+F7F77 putpixel(x,y,r,g,b); Alt 1015671

U+F7C.. is for control structures of the program.
U+F7D.. is for operations upon data.
U+F7E.. is for events.
U+F7F.. is for functions and graphics.

----

I have been trying to enter items using WordPad and it is quite a task, though as each of these Alt codes starts with 101 it is not at onerous as it could be if seven digits had to be remembered all at once on a temporary basis.

William Overington

23 February 2009

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Mon Feb 23, 2009 10:48 am

I have now prepared a typecase_ file for the 48 codes of the 7001 processor.

I made the file using WordPad on a PC running under Windows xp professional. I manually keyed each of the 48 Alt codes and saved as a Unicode Text Document.
typecase_for_7001_processor.txt
typecase_for_7001_processor.txt
(448 Bytes) Downloaded 309 times
For readers wishing to analyse the file, the ViewHex program is recommended.

viewtopic.php?p=10579#p10579

William Overington

23 February 2009

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Mon Feb 23, 2009 7:37 pm

Earlier in this thread was a pdf containing a program for the processor that was based in the plane 0 Private Use Area.

http://www.users.globalnet.co.uk/~ngo/p ... am_001.pdf

I decided earlier today to try to transcribe, manually, that program so that the same program for the 7001 processor would be produced, though the result would be in a Unicode Text Document produced from WordPad.

I started by opening typecase_for_7001_processor.txt in WordPad and then saving a copy as a_program_for_the_7001_processor.txt and then I copied the notes from the pdf and pasted them into a_program_for_the_7001_processor.txt and then I used copy and paste of one character at a time within the a_program_for_the_7001_processor.txt file as displayed in WordPad so as to build up the program: in effect I had a typecase within the same file, which was convenient. I found it quite straightforward to build up the program using this method. Finally I deleted those characters copied from the typecase_for_7001_processor.txt file that were not needed in the a_program_for_the_7001_processor.txt file.

Here is the result.
a_program_for_the_7001_processor.txt
a_program_for_the_7001_processor.txt
(1.1 KiB) Downloaded 303 times
William Overington

23 February 2009

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Tue Mar 10, 2009 9:47 am

Yesterday I made some notes about designing the 7002 processor.

Thinking that some readers might be interested to read them I am posting them in this thread.

I have not yet started to make a font with authoring-time glyphs for the 7002 processor.

Indeed, as far as I know, no interpreter for the 7001 processor has yet been produced, so maybe the designing of the 7002 processor should have waited for that to happen: however, opportunities sometimes favour the prepared inventor, so maybe the producing of a design for the 7002 processor now is a good idea.

William Overington

10 March 2009

----

Monday 9 March 2009

07:00 am

Starting to design the 7002 processor.

The 7002 processor is a superset of the 7001 processor.

The 7001 registers are as follows.

Registers ai, hi, p, q, x, y, j, r, g, b.
Memory array mi[1..1023].

The register q is of type Boolean.
All of the other registers are of type integer.
Each item of the memory array is of type integer.

For the 7002 processor, keep those registers and add the following registers

af, hf
Memory array mf[1..1023].

The registers af and hf and the memory array are all of type floating point.

Add the register v.

The register v is of type integer and has a default value of 7001 at startup.
There is only one instruction involving the v register, namely v:=ai; that allows a program to signal to a processor as to which version of processor is needed to obey the program. If the processor does not have that capability, then a message saying so can be provided to the end user.

The following instructions are added.

U+F7C78 v:=ai;

U+F7D50 af:=0.0;
U+F7D51 af:=af+hf;
U+F7D52 af:=af-hf;
U+F7D53 af:=af*hf;
U+F7D54 af:=af/hf;

U+F7D5A hf:=0.0;
U+F7D5B hf:=10.0*hf+p;

U+F7D5E mf[j]:=af;
U+F7D5F hf:=mf[j];

U+F7D37 q:=af>0.0;
U+F7D39 q:=af<0.0;

floating point functions

U+F7F51 af:=sin(af);
U+F7F52 af:=cos(af);
U+F7F53 af:=tan(af);
U+F7F54 af:=arcsin(af);
U+F7F55 af:=arccos(af);
U+F7F56 af:=arctan(af);
U+F7F57 af:=arctan2(af,hf); * Compute arctan(af/hf) with regard to the signs of both af and hf.
U+F7F58 af:=exp(af);
U+F7F59 af:=log(af); *The natural logarithm
U+F7F5A af:=sqrt(af);
U+F7F5B af:=abs(af);

conversion from integer to floating point

U+F7D55 af:=float(ai);

conversion from floating point to integer

U+F7D57 ai:=entier(af);

This is a total of 25 additional instructions.

A useful reference for the entier function is as follows.

http://burks.bton.ac.uk/burks/language/ ... report.htm

----

Supplementary note of 6 April 2009

The only changes are the correction of an error and the adding of this note of explanation.

The error was that, in preparing the list of commands for arithmetic for floating point, starting from a copy of the list of commands for arithmetic used for integers, I had not changed one occurrence of ai to become af.

William Overington

6 April 2009
Last edited by William on Mon Apr 06, 2009 6:53 am, edited 3 times in total.

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Tue Mar 31, 2009 8:47 am

Some readers might like to know that recently I started a thread in the Unicode Public Email List that referenced this present thread in the High-Logic forum.

http://www.unicode.org/mail-arch/unicod ... /0168.html

Thus far the thread has twenty posts.

They are available in the archive from links on the following page.

http://www.unicode.org/mail-arch/unicod ... index.html

The thread has the title On the possibility of encoding a portable interpretable object code into Unicode and the posts are accessible from links in the later part of the above-referenced index page.

William Overington

31 March 2009

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Wed Apr 01, 2009 7:47 am

Here are some notes about designing the 7003 processor.

The 7003 processor introduces a call and return mechanism so that a program may have a small number of functions defined within it. The mechanism is a little unusual so that the software can be interpreted directly from the character codes without needing to be compiled.

The 7003 processor is a superset of the 7002 processor.

The 7002 registers are as follows.

Registers ai, hi, p, q, x, y, j, r, g, b.

All of the above registers are of type integer.

Memory array mi[1..1023].

Each item of the memory array is of type integer.

Registers af, hf.

The registers af and hf are of type floating point.

Memory array mf[1..1023].

Each item of the memory array is of type floating point.

The register q is of type Boolean.

Register v.

The register v is of type integer and has a default value of 7001 at start-up.

The 7003 processor has the following additional items.

Registers c and k.

The registers c and k are of type integer.

The registers c and k each have a value of 0 at initialization.

Memory array g[1..1023].

Each item of the memory array is of type integer.

The purpose of the c and k registers and of the g array are to provide a simple means for calling functions and returning from them.

The mechanism is somewhat unusual, yet has been designed specifically for the 7003 processor due to the fact that the software is encoded as characters and is interpreted.

Suppose that a 7003 program is to call a function. The function is defined after the halt; command of the program yet before the finish; command. The 7003 processor has facilities to define four functions. Suppose that it is desired to define function 1. This is done by using U+F7F11 define{1} followed by whatever commands one wants in the function followed by U+F7F21 enddefine{1};. The U+F7F21 command is both a marker of the end of the definition and a return; command combined. A separate return; command is also provided so that, for example, a return can be made if some condition is met while obeying the function.

In order to call the function, a sequence of two instructions is needed. These are U+F7F30 c:=hi; so that the c register is loaded. In order to call function 1, the c register needs to have the value 1 loaded into it. So the U+F7F30 c:=hi; command needs to be preceded by commands to put the value 1 into the hi register. After the U+F7F30 c:=hi; command there needs to be one of the commands from the U+F7F31 place{1}-call(c); to U+F7F39 place{9}-call(c); set of commands. It might be U+F7F31 place{1}-call(c); yet it does not have to be. It could be any of the set. For this explanation, let us suppose please that U+F7F33 place{3}-call(c); is used.

The characters U+F7F11, U+F7F21 and U+F7F33 can each only be used once in any one program.

Thus the two character sequence is U+F7F30 U+F7F33.

The operation of the U+F7F33 command is to add 1 to the value of k, then to set g[k] to a value of 3, and then to seek the define that has the same number as the value of c.

So, in this example, c has the value of 1, then function 1 is sought.

When return from the function is to happen, the effect to take the value of g[k], which is 3 in this example, then reduce k by 1, then to find the character after the U+F7F33 character and then continue interpreting from the instruction after the U+F7F33 character.

A call to function 1 from somewhere else in the program would use a different place-call character.

By this mechanism a call can be made and return be made to the correct place without the need to compile the software.

Please know that the g array cannot be accessed by commands other than to effect a return from a call. So the index number used for the place-call item is independent of the data of the program. The content of the c register cannot be accessed directly by any commands, though a copy of the value that had been loaded into the c register could be stored elsewhere. Often, the value used for c would be entered into the software directly using a command such as U+F7D81 p:=1; but the value could also be obtained as the result of a computation if desired.

Commands to define a function.

U+F7F11 define{1}
U+F7F12 define{2}
U+F7F13 define{3}
U+F7F14 define{4}

U+F7F21 enddefine{1};
U+F7F22 enddefine{2};
U+F7F23 enddefine{3};
U+F7F24 enddefine{4};

There are the same number of enddefine commands as there are define commands.

In order to call a function, two commands are used in sequence, namely setting a value for c followed by a place-call.

U+F7F30 c:=hi;

U+F7F31 place{1}-call(c);
U+F7F32 place{2}-call(c);
U+F7F33 place{3}-call(c);
U+F7F34 place{4}-call(c);
U+F7F35 place{5}-call(c);
U+F7F36 place{6}-call(c);
U+F7F37 place{7}-call(c);
U+F7F38 place{8}-call(c);
U+F7F39 place{9}-call(c);

For example, c:=hi; place{3}-call(c);

There are a number of place-call items. Each is used no more than once in any one program. Please note the wavy brackets used with the place and the parentheses used with the call. The word place is used to mean "this is nominated as being place number"

The effect of the place-call is to add 1 to the value of k, then to have g[k]:=the place value and then to seek the define that has the same number as the value of c.

U+F7F4F return;

In order to return without reaching an enddefine command there is the return; command, the effect of which is, ( if k > 0 else flag an error) to take the value of g[k], then reduce k by 1, then to find the character after the place-call of the value found from the array and then continue interpreting from the instruction after that place-call command.

William Overington

1 April 2009

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Wed Apr 01, 2009 7:54 am

The 7004 processor adds one command to the 7003 processor.

Pause command

The following command is added so that the facility exists to build up a display gradually so that the build up of the display can be observed.

U+F7FFF pause(ai); * ai is in milliseconds.

William Overington

1 April 2009

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Wed Apr 01, 2009 8:16 am

I am trying to design the 7005 processor so as to be able to output text strings to a screen display.

However, I am concerned that the effect may not be precisely defined and that the display would not be consistent as regards the display on one computer and the display on another computer, which would mean that portability would not be correct.

The items for manipulating characters and strings seem to me to be consistent with portability, though I am happy to know of any contrary views.

What is concerning me is the drawtext command. I am wondering what needs to be specified so that portability is achieved. This seems to me to be largely a font issue and how an interpreting program would produce a display. The font:=ai; command is also of some concern. Is it best to specify a font using a number or should a string be used?

Here are the notes thus far.

----

The 7005 processor is a superset of the 7004 processor.

The 7005 processor adds some facilities to handle characters and strings.

Characters

Registers ah, hh
Memory array mh[1..1023].
The registers ah and hh and the memory array are all of type character.

U+F7D20 ah:=hh;
U+F7D21 hh:=(char) ai;
U+F7D22 hi:=(integer) ah;
U+F7D24 place the next character in hh

U+F7D26 mh[j]:=ah;
U+F7D27 hh:=mh[j];

Text Strings

Please use a Unicode non-character for internally denoting the end of a text string in software implementing these codes so that the possibility that U+0000 can be included in a text string if desired is kept open.

Registers at, ht
Memory array mt[1..1023].
The registers at and ht and the memory array are all of type string.
U+F7D28 at:=ht;
U+F7D29 at:=concatenate(at,ht)
U+F7D2A ht:=(string) ah;
U+F7D2B hh:=(char) at.j; *The first character of a string is found by using 1 as the value of j.

U+F7D2C start of text string
U+F7D2D end of text string and place text string in ht;

U+F7D2E mt[j]:=at;
U+F7D2F ht:=mt[j];

Putting text on the screen is a complicated issue in that this system is intended to have a small footprint and yet also to be capable of expansion. For initial development experiments, text output to the screen could be with textsize set at 32 and font set at 0. The 32 corresponds to 24 point on the Windows platform.

U+F7F99 xtext:=ai;
U+F7F9A ytext:=ai;
U+F7F9B textsize:=ai;
U+F7F9C font:=ai;

U+F7FD1 drawtext(xtext,ytext,r,g,b,textsize,font,at);

My thinking is that using U+F7FD1 when xtext is set at 200 and ytext is set at 100 and textsize is set at 32 would have the baseline of the text start at (200,132). Starting a second line of text with xtext set at 200 and y text set at 150 and textsize set at 32 would give clearance for descenders such as in g, j, p, q and y when using most fonts.

Using U+F7FD1 does not update the values of xtext or ytext as this is a function for displaying text without referring to the font metrics.

----

William Overington

1 April 2009

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Mon Apr 06, 2009 8:13 am

I have now designed a collection of commands for the manipulation of complex numbers.

This post is essentially of research notes, yet hopefully some readers might find these notes of interest.

The 7006 processor is a superset of the 7005 processor.

The 7006 processor adds some facilities to handle complex numbers and also extends the set of functions available for floating point variables.

The 7006 processor adds two registers and some memory.

Registers

az, hz

Memory array mz[1..1023]

The registers az and hz and the memory array mz are all of type complex. A program that interprets the command codes should model each complex number by using two floating point numbers.

The following commands are added.

U+F7D60 az:=0.0;
U+F7D61 az:=az+hz;
U+F7D62 az:=az-hz;
U+F7D63 az:=az*hz;
U+F7D64 az:=az/hz;

U+F7D66 az:=az*af; * this produces multiplication of a complex number by a real number
U+F7D67 az:=az/af; * this produces division of a complex number by a real number

U+F7D68 az.r:=af;
U+F7D69 az.i:=af;
U+F7D6A af:=az.r;
U+F7D6B af:=az.i;
U+F7D6C af:=radius(az); * af takes the r part of the (r,theta) representation of az
U+F7D6D af:=theta(az); * af takes the theta part of the (r,theta) representation of az
U+F7D6E mz[j]:=az;
U+F7D6F hz:=mz[j];

U+F7F60 az:=conj(az); * The complex conjugate
U+F7F61 az:=sin(az);
U+F7F62 az:=cos(az);
U+F7F63 az:=tan(az);
U+F7F64 az:=arcsin(az);
U+F7F65 az:=arccos(az);
U+F7F66 az:=arctan(az);
U+F7F67 az:=arctan2(az,hz); * Compute arctan(az/hz) with regard to the signs of both az and hz.
U+F7F68 az:=exp(az);
U+F7F69 az:=log(az); *The natural logarithm
U+F7F6A az:=sqrt(az);
U+F7F6B az:=abs(az);
U+F7F6C az:=sinh(az);
U+F7F6D az:=cosh(az);
U+F7F6E az:=arcsinh(az);
U+F7F6F az:=arccosh(az);

----

Also, the 7006 processor extends the set of functions available for floating point variables.

U+F7F5C af:=sinh(af);
U+F7F5D af:=cosh(af);
U+F7F5E af:=arcsinh(af);
U+F7F5F af:=arccosh(af);

William Overington

6 April 2009

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Mon Apr 13, 2009 8:15 am

I have now designed a collection of commands for the manipulation of quaternions.

This post is essentially of research notes, yet hopefully some readers might find these notes of interest.

Some of the functions of a quaternion are quite exotic. However, at least two of them, logarithm and exponential, have a very practical application.

Quaternions are very useful for three-dimensional design packages. Both positions and rotations can each be expressed as quaternions. For example, Serif ImpactPlus uses quaternions internally.

If one has a rotation and one wishes to break it down into a number of stages, so that, for example, a rotation can be shown taking place in an animation; then taking the logarithm of a quaternion that represents a rotation, dividing by the number of steps desired and then taking the exponential of that result, produces the rotation quaternion for one step of the animation.

The 7007 processor is a superset of the 7006 processor.

The 7007 processor adds some facilities to handle quaternions.

The 7007 processor adds two registers and some memory.

Registers

aq, hq

Memory array mq[1..1023]

The registers aq and hq and the memory array mq are all of type quaternion. A program that interprets the command codes should model each quaternion by using four floating point numbers.

The following commands are added.

U+F7D70 aq:=0.0;
U+F7D71 aq:=aq+hq;
U+F7D72 aq:=aq-hq;
U+F7D73 aq:=aq*hq;
U+F7D74 aq:=aq/hq; * this produces division with the conjugate / conjugate multiplication term placed on the right hand side.
U+F7D75 aq:=aq|hq; * this produces division with the conjugate / conjugate multiplication term placed on the left hand side.
U+F7D76 aq:=aq*af; * this produces multiplication of a complex number by a real number
U+F7D77 aq:=aq/af; * this produces division of a complex number by a real number

U+F7D7E mq[j]:=aq;
U+F7D7F hq:=mq[j];

U+F7DE8 aq.r:=af;
U+F7DE9 aq.i:=af;
U+F7DEA aq.j:=af;
U+F7DEB aq.k:=af;
U+F7DEC af:=aq.r;
U+F7DED af:=aq.i;
U+F7DEE af:=aq.j;
U+F7DEF af:=aq.k;

Some more may be needed to produce quaternion versions of modulus radius and theta.

The following are research allocations. Some are well defined, yet, for example, tan(aq); may perhaps not be clearly defined.

However, the list is included as some, such as aq:=log(aq); and aq:=exp(aq); could be useful for computing various stages on the route of a rotation path between a starting point and a finishing point.

U+F7FE0 aq:=conj(aq); * The quaternion conjugate
U+F7FE1 aq:=sin(aq);
U+F7FE2 aq:=cos(aq);
U+F7FE3 aq:=tan(aq);
U+F7FE4 aq:=arcsin(aq);
U+F7FE5 aq:=arccos(aq);
U+F7FE6 aq:=arctan(aq);
U+F7FE7 aq:=arctan2(aq,hq); * Compute arctan(aq/hq) with regard to the signs of both aq and hq.
U+F7FE8 aq:=exp(aq);
U+F7FE9 aq:=log(aq); *The natural logarithm
U+F7FEA aq:=sqrt(aq);
U+F7FEB aq:=abs(aq);
U+F7FEC aq:=sinh(aq);
U+F7FED aq:=cosh(aq);
U+F7FEE aq:=arcsinh(aq);
U+F7FEF aq:=arccosh(aq);

William Overington

13 April 2009

William
Top Typographer
Top Typographer
Posts: 1957
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: A font for some experiments in computing

Post by William » Tue Apr 14, 2009 1:21 pm

I have added the following structures to the system.

U+F7CD1 repeat{1}
U+F7CE1 until{1}
U+F7CF1 endrepeat{1};

U+F7CD2 repeat{2}
U+F7CE2 until{2}
U+F7CF2 endrepeat{2};

The repeat statements are intended to work as follows.

repeat{1} until{1} endrepeat{1};

The repeat{1} does nothing itself, though it may be searched for when an endrepeat{1}; is obeyed.

The until{1} does nothing. It is just for assisting people to understand the layout of a program. Usually the value of q will be computed by instructions after the until{1}.

The endrepeat{1}; acts on the value of q when it is encountered. If q is true then endrepeat{1}; does nothing; the running system then continues obeying instructions from the instruction immediately after the endrepeat{1};. However, if q is false, then the running system searches backward for the occurrence of repeat{1}; and then continues obeying instructions forward from the instruction immediately after the repeat{1};.

Similarly for the repeat{2} until{2} endrepeat{2}; sequence.

The {1} set and the {2} set operate independently of each other, so that nesting is possible.
Also, another thirteen code points in each of eleven blocks are reserved such that the arrayized if statements, while statements and repeat statements could be expanded up to as many as fifteen levels of nesting if that is needed in the future. That is, code points for items {3} to {15} of each of if, then, elsif, else, endif, while, do, endwhile, repeat, until and endrepeat.

For example, U+F7CEC is reserved so that if until{12} is needed in the future, then the code point is available.

William Overington

14 April 2009

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest