OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Feb 25, 2018 3:26 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Plain English Programming - Another kick at the can.
PostPosted: Sat Dec 23, 2017 4:35 pm 
Offline
Member
Member

Joined: Thu May 19, 2011 5:13 am
Posts: 205
Plain English Programming - Another kick at the can.

_________________
Mike Gonta
look and see - many look but few see

http://mikegonta.com


Top
 Profile  
 
 Post subject: Re: Plain English Programming - Another kick at the can.
PostPosted: Sun Dec 24, 2017 1:04 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8248
Location: At his keyboard!
Hi,

mikegonta wrote:


For English, the words "Uppercase the byte" are unnatural and should be replaced with something like "Convert the byte to upper case".

In fact, all of the code seems stilted and poorly worded. Just replace it with this code:
Code:
To figure out if two strings (that have lengths) are equal; compare the lengths, then compare characters from both strings in order (e.g. first character of one string compared to first character of the other string, then second character of one string compared to second character of the other string, etc). If anything (length or characters) aren't equal then the strings aren't equal. For character comparisons; characters with no difference other than case shall be considered equal.


This shouldn't be a problem for a compiler that compiles plain English.


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: Plain English Programming - Another kick at the can.
PostPosted: Sun Dec 24, 2017 5:17 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 27, 2010 4:53 pm
Posts: 945
Location: Scotland
Thanks for giving it another kick - I failed to appreciate it properly the last time. Gerry is very impressive, patiently explaining his project over and over again to people who make ridiculous objections to it. He really has built something worthwhile - much better than I'd expected it to be. I will take the time to read up on it properly this time.

_________________
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming


Top
 Profile  
 
 Post subject: Re: Plain English Programming - Another kick at the can.
PostPosted: Mon Dec 25, 2017 8:30 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8248
Location: At his keyboard!
Hi,

DavidCooper wrote:
Thanks for giving it another kick - I failed to appreciate it properly the last time.


The entire point of a plain English compiler is to prevent the need for people to spend a lot of time learning a new language and all of that new language's keywords and rules. This language fails to meet that objective. It'd be easier for someone who knows English to learn Python than it would be to learn the compiler's "plain English" language.

I can admire someone that tried and failed (it is better than not trying at all); but it's obvious that these developers didn't even try.


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: Plain English Programming - Another kick at the can.
PostPosted: Tue Dec 26, 2017 3:57 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 27, 2010 4:53 pm
Posts: 945
Location: Scotland
Brendan wrote:
The entire point of a plain English compiler is to prevent the need for people to spend a lot of time learning a new language and all of that new language's keywords and rules. This language fails to meet that objective.

You're right that it fails, but it's a good effort which succeeds to a much greater degree than I had expected. It does get clunky in places with such weird wording that there's nothing plain about it, but a lot of it does use simple natural wording which does the job. It's a working system which its creator clearly enjoys using and which may appeal to others.

Quote:
I can admire someone that tried and failed (it is better than not trying at all); but it's obvious that these developers didn't even try.

Having read the 120 page manual (which is well written and entertaining), it's clear to me that they did try, and they achieved a lot. However, with individual programmers being able to decide how words are used (i.e. what they mean) to extend the number of words it is able to respond to, I can imagine trouble when two programmers who've worked independently with the language for a long time get together to work on a shared project, although if that isn't a big problem for Forth, it may not be a problem for Plain English either. What really impressed me about it though was how well its creator handled the linguistics without going to the trouble of trying to do natural language properly - I expected it to be a useless pile of pants, but it's actually a high-quality, functional product which deserves to be recognised as such, and which is well worth taking a look at just to see what it does.

_________________
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming


Top
 Profile  
 
 Post subject: Re: Plain English Programming - Another kick at the can.
PostPosted: Sun Feb 25, 2018 12:02 pm 
Offline
Member
Member
User avatar

Joined: Tue Mar 06, 2007 11:17 am
Posts: 1089
Another way to program in an exceptionally effective way is to just meditate as you normally do on how to implement the next step, and write down the very phrase that occurs to you in a text file, a short phrase of what you really need to do next. That's it. It will serve as human assembly language that you can later use instead of having to use energy again just to think about what to do next.

Over time, you will have so many sequences in normal language, that you will be able to reuse those sequences, and that will speed up your development a lot. Will be very similar to when machines didn't even have proper assembly language, only that you will do it with your brain.

________________________________________
________________________________________
________________________________________
________________________________________
When implementing the actual code, you could also assume that what you are writing is a regular text file. Then just write everything as comments, but as soon as it occurs you how to write some code, just do it giving the variables/functions/keywords, names that match the paragraph you were writing, with proper syntactic structure.

Later you will be able to easily remember what you were doing because it will resemble a tutorial or a book. It allows you to apply complex human optimizations. I've been trying it and I see that when I identify bugs or poor/bad code, I end up coming with very optimized changes to the code as I read the full paragraph and try to make it make sense again.

The comments and the code are the same. The regular explanations are the part that makes the code as easy to understand as a tutorial, and the actual code is the part of the writing that calculates the very details we intend from what we are saying. They could be other parts of that paragraph that we want to execute, but for what we want to do in a given moment, the comment/code writing, points to what we need to execute.

Example
Quote:
Convert Decimal to Hexadecimal


If we have a decimal number like 121, we have to divide %16 and get the remainder. For the first iteration, the remainder is 121%16 = 121/16=7.... 7x16=112 121-112 = 9.

That (9) is the least significant digit of the hexadecimal number, it's the remainder of 121/16, it is the modulo 121%16.

After dividing 121/16, we are left with 7, since this is lesser than 16 and that's the remaining decimal number, that is the last digit, the next most significant digit.

The hexadecimal number is left as:

(7)(9)


The above is intended to explain an Arithmetic problem with interleaved text and calculations, the math version of the same way of programming in a human readable way without leaving calculations or code when needed to implement.

Now we only need to write a program based on the above, with interleaved comments to write a dual tutorial/code text file that compiles. It's easier now.

We can also convert books to code in this way, we will learn to skip things that the book contains but that we cannot implement or add to the comments, and add them gradually to the code only as we need them for an implementation.

_________________
http://devel.archefire.org/forum/
http://www.archefire.org/_PROJECTS_, http://sourceforge.net/u/udocproject/

YouTube Development Videos:
http://www.youtube.com/user/AltComp126/videos

IP for hosts file:
190.150.9.244 archefire.org (udocproject@yahoo.com)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Majestic-12 [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group