Natural Language Programming

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Natural Language Programming: Good Idea?

  • Yes

  • Maybe

  • No


Results are only viewable after voting.
Status
Not open for further replies.

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
Now, not going through criticizing posted text, I think something like this would be excellent to teach young children through adolescents. How many people do you know that were taught to have a mental block against math, or stats; or a block against exploring any advanced piece of technology? Yet many of those same people can be given tools which have programming extensions, such as AutoCAD, FI, and become novice programmers with nothing but the need for dynamic macros. Or, they can learn to be quite adept at VBA, which is a horrendous language, IMO, to do what they need to get done in Excel, or Access. Or, they have Maple, Matlab, Mathematica, Sage, etc., as tools to use for R&D. But, oh, programming? No, can't do that stuff, it's too complex/hard/abstract/etc. (despite being able to write practical programs in an M-expression or S-expression language)!

If programming is taught in primary schools as an extension of math or science, people quite capable of grasping its main concepts will avoid it, or fail due to those parts of it; doubly-so if they try to use C or a clear derivative of C, and even more-so with a language using Simula-like OOP (pretty much anyone can grasp Smalltalk or Ruby's OOP implementations, FI, since they are primarily based on what the code is, does, or is for, rather than an abstract heirarchy). Djikstra may have had bad things to say about BASIC, but that was because he predated Java! :)

Well said.
 

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
You seem to like slapping a new label on programming languages and call it English but it is not.
By "English" you seem to mean "every thought that can be expressed in that language." But when we say "English" we mean "particular thoughts expressed in accord with the ordinary rules of English syntax and grammar."

"Clear the screen", for example, is an ordinary English-language sentence (which our compiler "understands" well enough to translate into working machine code). "Magnus the Brewer doesn't seem to like our compiler, though I'm not sure he's even seen the thing" is also an ordinary English-language sentence (which would baffle our compiler -- even more than it baffles us!). So, yes, our compiler doesn't understand everything that can be said in English; but it does understand a lot of English-language sentences. More than 25,000, in fact, just in our development system alone.

In your example you showed two different approaches your son and you took to define a term /action. Computers do not "learn."
I don't know exactly what you mean by "learn"; we mean "become capable of understanding or doing something you couldn't do before." In this latter sense, our compiler can be taught, and learns to understand and do things it couldn't do before.

If your example was followed, thousands, if not millions of English users would have to create their usage.
Not as many as you'd suspect; there really aren't that many different ways of saying things in English that are acceptable to native speakers. Try, for example, to think of more than a few ways to say "I'm going to the store." If you make it past 10 I'll be surprised.

But as I mentioned in my previous reply to you: In traditional languages, the programmer would be encouraged to code up one and only one way to perform a certain task; in our world, programmers are encouraged to teach the compiler anything and everything they can, so that whatever the next programmer tries to do, there's a greater probability that the compiler will understand his way of expressing himself as well.

The definitions might be similar but, computers do not make assumptions. Every time a new user tried to use a term, the computer must run through all the definitions it has listed to try and find a match. If there is no match, the user has to redefine it yet again. You imply that if your software takes enough baby steps, it will be able to parse English by any user, hogwash. The computers and software we have now and in the foreseeable future are incapable of doing so. Youncan try to hide the logical fallacy behind calling it a "prototype " but, that won't make it true.
I think you've got the idea (though clearly you don't believe in it). Here's a copy of our short white-paper on the subject:

HOW TO BUILD AN (APPARENTLY) INTELLIGENT MACHINE

We begin with some reasonable definitions so our goals will be tangible and measurable:

(a) If the machine does what we tell it to do, it UNDERSTANDS.
(b) If the machine can be taught new things, by whatever means, it LEARNS.
(c) If the machine can tell us what it knows and what it has done, it REMEMBERS.

Then we develop a programming language that is a subset of a natural language so the teaching of the machine can take place over a long period of time, by a wide variety of people, without the danger of older input becoming syntactically obsolete, and without the nuisance of a steep learning curve. (This is our Plain English compiler.)

Next, we teach the machine to maintain compiled and indexed copies of all type, global variable, and routine definitions submitted by the wide variety of people mentioned above. We teach it to rank said definitions based on weighted feedback from those same people, and to keep only those definitions that produce results acceptable to those people. We teach it to eliminate exact duplicates, of course, and to randomly exercise functionally equivalent definitions in the interest of producing further feedback.

An example may be helpful at this point. Let's say someone is attempting to teach the machine how to perform an image search on the internet. His instructions will probably include a sentence such as "Log on to the internet." which the machine will hopefully resolve to an existing routine. If the person is satisfied that the machine rightly understood the sentence, he will move on. But if he is not, he will tell the machine why he is dissatisfied, and the machine will then attempt to service him with a different routine (marking the other routine as unsatisfactory for the stated reason). If, in the end, no satisfactory routine is found, the machine will say, "I don't know how to do that." and the individual will have to teach the machine that particular skill as well, or wait until someone else does.

Finally, we teach the machine to make a record of all of the significant actions it performs, and to analyze and report on any or all of the recorded events. At this point, the machine is "alive"; all that remains is to connect it to various input and output devices, including the internet, and let it grow. Clones of a given machine, connected to different devices at different times, will of course grow in different ways.


Our hope is to recruit, say, 100 "teachers" who will each explain 10 things to the machine every day, so that at the end of just three years, our "apparently intelligent"(tm) machine will understand and properly respond to more than a million natural language sentences. There's more to it, of course, but that's the gist. And yes, it's a bit of a "brute force" approach -- but very much like the approach we all use with our children!
 
Last edited:

MagnusTheBrewer

IN MEMORIAM
Jun 19, 2004
24,135
1,594
126
As was previously said, you're selling snake oil. Even if you found 100 people who knew nothing about programming and, math and, silly enough to spend their time on your project, you would end up with more lines of code than MS has ever released and it STILL wouldn't work period.

Take it somewhere else.
 

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
As was previously said, you're selling snake oil.
Snake oil or not, I'm not selling anything. Our development system is free for the asking, and open source to boot. In fact, I'm buying. See here, for example:

http://www.dreamincode.net/forums/t...al-programmer-wanted-for-compiler-conversion/

Even if you found 100 people who knew nothing about programming and, math and, silly enough to spend their time on your project, you would end up with more lines of code than MS has ever released and it STILL wouldn't work period.
Wikipedia tells me that Windows XP probably has about 45 million lines of code. The average number of lines in a Plain English routine is just under 15, including associated type definitions. If our 100 teachers contribute as described above, our "apparently intelligent" machine will properly understand well over a million English-language commands with just 15 million lines of code. That's only 30% the size of Windows XP; and orders of magnitude more friendly than any of the convoluted Windows APIs!

Take it somewhere else.
Aw, c'mon. Let's give it a little more time. I'm already up to two "maybes" in the poll at the top of this thread!
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
As was previously said, you're selling snake oil. Even if you found 100 people who knew nothing about programming and, math and, silly enough to spend their time on your project, you would end up with more lines of code than MS has ever released and it STILL wouldn't work period.

Take it somewhere else.

Actually, what I believe I said was that it reads like a snake oil pitch. I'll give almost anyone the benefit of the doubt when it comes to interesting ideas, and I firmly believe that revolutions can come out of left field. If I did not I would have pointed out previously in this thread that there is a _huge_ amount of work being done in natural language processing these days, by some of the most capable and innovative software houses in the world (i.e., Google), and that the OP has not show any evidence of having been even peripherally involved with any of it (the only Gerry Rzeppa I can find is the author of a self-published book on spirituality).

But that in itself doesn't mean anything. What _does_ mean something, to me at least, is the OP's apparently steadfast insistence on promoting his project by getting people to download an opaque binary archive and run his software. Unless the OP has actually been in a hole for the last seven years working on his project he can't be unaware of the right way to go about this. There are dozens of recognized, above-board ways to publicize and get feedback on a project like this, and OP is ignoring all of them in favor of the one approach that is guaranteed to generate skepticism. The only reasonable explanations for this are that the OP is either a) an actual bad actor; or b) someone who is completely oblivious to the software world and how it works.

The only reason the thread hasn't been locked is that there remains some chance that the latter case is the correct one.
 

smackababy

Lifer
Oct 30, 2008
27,024
79
86
I haven't read the entire thread, sort of just skimmed through it, so bear with me.

I feel like the idea of a natural programming language is, at best, a novel idea. It offers not real benefit to actual programmers. It might be okay for introduction to programmer, but it won't have the layout or the readability of code we use now. It would be easier for nonprogrammers to understand, but they shouldn't be looking at code anyway.

The concept of HAL 9000 wasn't that he was written in some natural language, so he could understand spoken commands (and have meaningful dialog with the other characters), it was that he could interpret what they were saying into commands written in whatever language he was written in and do the appropriate functions.

Why is such a project being so heavily designed? What benefits would such a language offer over say Java, C++, Python? And then, at what point would words stop being as needed. Say, rather than "Instantiate a new Dog and call him Ralph", why wouldn't I just say "new dog ralph"? Which is what developers would do (look at how few use meaningful comments), and then it becomes just as useful to those not familiar with code as current languages.

OP, if you want people to take this seriously, stop trying to avoid "noise" or whatever and host the file on your website. Then, you can provide us with a link to your site and we can easily download the file.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Another reason to post the source code for the language interpreter is if there is anything to it beyond a simple rule-based system, some people might help to improve it.

If this was made into an open-source project hosted on a reputable site, others could look at the code and point out mistakes and suggest optimizations.

For example, the rule system might be doing linear search for pattern matching that won't scale up, while a hash or tree scheme would.

Many years ago in college I made a 1-line change to a professor's lisp-based agent system that reduced the CPU use from near-100% down to ~5%. More eyes on the code could result in much better code.
 
Last edited:

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
...The only reasonable explanations for this are that the OP is either a) an actual bad actor; or b) someone who is completely oblivious to the software world and how it works.
Or, c) someone who is well aware of "the software world and how it works" -- and simply doesn't like it. Who wants to offer alternatives in every aspect of the industry (and life in general, for that matter): interfaces, languages, ways of doing business. And who thus challenges others to think outside the box by doing everything just a little differently.

Take a look at our development system (or just the documentation if you're still wary of running it) and you'll see just how different it is, in almost every respect, from the usual way of doing things. From our default font to the way we assemble machine code; from our menu system to the way we scroll; from our first-person instruction manual to our comment-free code; we're pushing boundaries, questioning the status quo, experimenting, and, yes, trying to have some fun along the way.

Here's a common example of today's "software world and how it works" -- and why we find it so unacceptable. Most forums (including this one) don't have a wysiwyg editor for posts. Instead, they insist on the primitive method of editing in one place and previewing in another -- requiring the user to return to the first place when he wants to correct an error. Goodness! The Macintosh I had in the 1980's (with only 128 kilobytes of memory) was easier to use! Should we meekly accept this kind of inconvenient and obsolete interface just because it's "the way the software world works"?

People all over the world download our "opaque binary archive" every day to study our work. Here are some of the comments we've received:

"A minor work of genius" - Aaron Gray

"Well I love it!!! Very very unique... Are you looking for an investor?" - Anthony Nystrom

"Good lord, that has got to be one of the strangest things I've ever seen, except for the fact that I tried something like this myself 20 years ago on a Commodore PET. It certainly has some merit, as you can describe what you want to do 'naturally'. Well, I'll keep playing with it." - Marc Clifton

"Interesting; the source code is easy to read" - Peter Norvig

"It looks like an interesting tool for those stuck in Gatesburg XP." - Neil Freeman

"Thanks Sir. People like you are giving different view to whole thing. Best Luck." - Vijay Sambhe

"If I ever were to use it seriously I would definitely contribute to your project; at this point I was only allaying my curiosity." - Paul van der Walt

"To some extent, I think I owe you an appology. I have been baiting you horribly on CP" - [name withheld on request]

"The interface is pretty cool and would work well for a quite a few apps... All in all a good job, shame it got clouded with a rocky start in CP... I can see a great market for beginer programmers trying to understand concepts" - Andrew Bleakley

"I have to say I'm quite impressed... keep up the good work!" - Ian Harrigan

"What a wonderful piece of work... the concept is noble, the execution brilliant, the whole thing is quirky and brilliant" - Joe Cherian

"I do like the font and the simplicity of your website..." - Edbert P.

"A very unique idea." - Dan Pronovost


...the only Gerry Rzeppa I can find is the author of a self-published book on spirituality
That's probably me: www.someofthepartsbook.com
I also do database: www.era-sql.com
And teach kids to read: www.rhymingreader.com
And books for teens: www.bittersweetrye.com
And music: http://4praise.com/new/artists/31171.htm
And, as you know, programming languages: www.osmosian.com

I also build guitar amplifiers (www.bananajackamps.com), I'm an architect, an electrical engineer, a home church/home school pastor, and I've sold over 3000 watercolor paintings on eBay -- created with a technique I developed that almost anyone can master in just a few days (https://www.kickstarter.com/projects/1335354839/art-for-the-rest-of-us). A technique which is, incidently, as unpopular among "traditional" painters as Plain English is among "traditional" programmers!

We know how the world works, Mark. We just don't like it. So we go around, like good iconoclasts should, attempting to light a candle or two in the darkness. We're almost always greeted with resistance, at first, but "those with eyes to see" are attracted to the light and end up saying things like I've quoted above.

In the meantime, you're to be commended for your patience and restraint.
 
Last edited:

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
I feel like the idea of a natural programming language is, at best, a novel idea. It offers not real benefit to actual programmers. It might be okay for introduction to programmer, but it won't have the layout or the readability of code we use now.
We wondered about that kind of thing ourselves. But (after writing 25,000 lines of the stuff) we find both the layout and the readability of Plain English code to be both friendly and efficient.

It would be easier for nonprogrammers to understand, but they shouldn't be looking at code anyway.
Why not? What better way for a user to confirm that his developer has properly implemented his requirements?

The concept of HAL 9000 wasn't that he was written in some natural language, so he could understand spoken commands (and have meaningful dialog with the other characters), it was that he could interpret what they were saying into commands written in whatever language he was written in and do the appropriate functions.
Probably so; and that, we think, is one of the major mistakes artificial intelligence researchers have made. We believe that the easiest way to get a machine to understand English is to talk to it, all the time, and at every level except the very lowest, in English. Our compiler, for example, uses only 25 of Intel's 600-some machine language instructions; from there up, it's English, English, English. Which not only gives us greater insight into the problems encountered in making a machine understand English, but tells us that Intel CPUs are just plain bloated! Think of the battery life and the other advantages of a cool-running CPU with only 5% of the junk that's in there now! But I digress.

Why is such a project being so heavily designed? What benefits would such a language offer over say Java, C++, Python? And then, at what point would words stop being as needed. Say, rather than "Instantiate a new Dog and call him Ralph", why wouldn't I just say "new dog ralph"? Which is what developers would do (look at how few use meaningful comments), and then it becomes just as useful to those not familiar with code as current languages.
Great engineering is a balance between competing objectives: speed and reliability; conciseness and understandability; etc. The most concise statement is not always the best statement. But our long-range plans allow for "snippets" of more concise syntax where appropriate, as discussed elsewhere in this thread; after all, we're Plain English enthusiasts, not fanatics!

OP, if you want people to take this seriously, stop trying to avoid "noise" or whatever and host the file on your website. Then, you can provide us with a link to your site and we can easily download the file.
The site is here: www.osmosian.com . The program (including documentation and source code) is stored on that site under the name "cal-3040.zip" -- just put a slash and tack that onto the site name. Or you can write me for a link to the program either here: help@osmosian.com or here: gerry.rzeppa@pobox.com and I'll include the introductory material that we typically send when someone requests the link directly.
 

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
Another reason to post the source code for the language interpreter is if there is anything to it beyond a simple rule-based system, some people might help to improve it.
Yes, and that's part of our long-range plan. But we're not yet at that stage. The plan is outlined in an earlier post, in violet text entitled "HOW TO BUILD AN (APPARENTLY) INTELLIGENT MACHINE".

If this was made into an open-source project hosted on a reputable site, others could look at the code and point out mistakes and suggest optimizations. For example, the rule system might be doing linear search for pattern matching that won't scale up, while a hash or tree scheme would.
Again, we agree. But we'd like to screen the participants, as it were, making sure we're agreed on overall principles and objectives before we get into details. We don't have the time or the resources to manage a "crowd" of developers of every imaginable ilk. The next step for people who want to get involved more deeply is to write us directly so we can get to know each other (and the development system) more intimately.

Many years ago in college I made a 1-line change to a professor's lisp-based agent system that reduced the CPU use from near-100% down to ~5%. More eyes on the code could result in much better code.
No doubt. In fact, we offer incentives for such contributions on page 88 of the instruction manual.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
We know how the world works, Mark. We just don't like it. So we go around, like good iconoclasts should, attempting to light a candle or two in the darkness. We're almost always greeted with resistance, at first, but "those with eyes to see" are attracted to the light and end up saying things like I've quoted above.

That's a load of BS. There are plenty of icons worthy of an iconoclast's time in the software world. Languages are not among them. Programming languages evolve rapidly, and today's "icon" is tomorrow's obsolete syntax. You're tilting at windmills.

A technique which is, incidently, as unpopular among "traditional" painters as Plain English is among "traditional" programmers!

Completely unfair, but crusaders like you always take this approach, don't you? Either people get your ideas or they are blinded by their own biases. You never consider the fact that the people responding are highly trained professionals in their own right, and have a strong basis for evaluating your ideas. In your mind the ideas are already so completely proven that the world is divided cleanly into initiates and infidels.

How could the people you quote have given you any meaningful feedback if you showed them what you have shown us? All they could have seen was an executable file and a text file containing what is essentially gibberish from a programming standpoint. I have no reason to think you actually parsed that file and built an executable from it, and even if you did I have no reason to think you could generalize that capability in any way whatsoever.

You've been challenged here not because people don't get your ideas, but because you're offering platitudes, generalities, and unsubstantiated claims. You've been offered every opportunity to post your source, and your methods, and in any way substantiate what you've said, and you continue to waste the members' time. You can have one more post on this thread, but if it doesn't contain something much more substantive than what we've seen so far, the thread is getting locked. You're making a lot of claims, so with all due respect, put up or shut up. And please do not continue to assert that running the executable in your .zip archive proves anything, to anyone.

Edit:

The site is here: www.osmosian.com . The program (including documentation and source code) is stored on that site under the name "cal-3040.zip" -- just put a slash and tack that onto the site name.

Another executable, a bunch of anonymous files with no extensions, and a PDF written in 2006 that begins "I am cal-3040."

Honestly, I think I'm leaving this open for the comedic potential.
 
Last edited:

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
...You're tilting at windmills.
I take that as a compliment. I've had Picaso's "Don Quixote" on my wall for years as inspiration. In fact, I painted and sold a unique colorized version of the thing just last year.

...Either people get your ideas or they are blinded by their own biases.
Or we're wrong. Or some combination.

You never consider the fact that the people responding are highly trained professionals in their own right, and have a strong basis for evaluating your ideas. In your mind the ideas are already so completely proven that the world is divided cleanly into initiates and infidels.
I don't think it's quite that simple. Some, I think, are merely disinterested; some are interested but have more pressing matters to attend to; some have brains that, through nature and/or nurture, simply look at things from a different perspective; some simply misunderstand what we're saying and doing; some have an investment of one kind or another that prevents them from being entirely objective. In some cases it appears to simply be a matter of timing -- I know there are ideas I categorically dismissed years ago, only to find them meaningful later. So it's not just "initiates" and "infidels". It's individuals, all with differing natures and experiences, attempting to communicate about the world we find ourselves in; and hopefully growing into more complete and balanced humans in the process.

How could the people you quote have given you any meaningful feedback if you showed them what you have shown us?
They downloaded the thing and played with it. In fact, some of the people on that list paid $100 for the priviledge back when we charged for the system.

All they could have seen was an executable file and a text file containing what is essentially gibberish from a programming standpoint.
What you call "gibberish from a programming standpoint" we call Plain English source code. It compiles, and runs.

I have no reason to think you actually parsed that file and built an executable from it, and even if you did I have no reason to think you could generalize that capability in any way whatsoever.
Well, why don't you find out? Download the thing and see for yourself (as hundreds of others have). I hate to say it, but you're beginning to strike me as a bit closed minded here, Mark...

You've been challenged here not because people don't get your ideas, but because you're offering platitudes, generalities, and unsubstantiated claims.
Plus a working prototype including documentation and source code.

You've been offered every opportunity to post your source, and your methods, and in any way substantiate what you've said...
And once again, the source, a description of our methods, and the working prototype are available to all for the asking: all they have to do is write me: gerry.rzeppa@pobox.com (I thought it more convenient to put the link right here, but, well, you've disallowed that).

...and you continue to waste the members' time.
Now you're just being silly. No member is forced to read this thread. And I'm sure I could find stuff that is significantly less edifying if I took just a few minutes to look around this site.

You can have one more post on this thread, but if it doesn't contain something much more substantive than what we've seen so far, the thread is getting locked.

How about the EBNF for the language? I'll paste it in at the bottom of this post. Compiler enthusiasts should like that.

You're making a lot of claims, so with all due respect, put up or shut up. And please do not continue to assert that running the executable in your .zip archive proves anything, to anyone.
But it does; in fact, it's the only way to see the thing actually working. And you can read the documentation (a PDF) and look at the source code (plain text files) without running anything but Adobe's reader and notepad.

Another executable, a bunch of anonymous files with no extensions, and a PDF written in 2006 that begins "I am cal-3040."
Not what you expected, huh? Boy, we're outside the box now! But great, you've unzipped the thing. The executable is the whole thing, compiled; the six files without extensions (the desktop, the finder, the editor, the compiler, the writer, and the noodle) contain the source code. There are no extensions on the files because extensions are not very English-like and it is, after all, a Plain English compiler (more rebellion against the status quo!). The Lexicon folder contains a list of words used for spell-checking; these are not used when compiling. And the Documentation folder contains the instructions in both PDF and native form (the instructions were written using our own wysiwyg page editor, which is part of the development system, and the PDF was generated by the same -- without recourse to a single Adobe DLL!).

Honestly, I think I'm leaving this open for the comedic potential.
We worked hard at making the instructions entertaining. Those familiar with the movies "2001 - A Space Odyssey" and "2010 - The Year we Make Contact" will enjoy them even more.

Here's the EBNF. Print it off and start with the routine called "To compile a directory" in the Compiler file and you'll see how the whole thing works (if you have the patience for that kind of in-depth analysis). Using our editor and the find command as described on page 7 of the documentation is the easiest way, in our experience. Reading page 11 of the instructions might also prove helpful as a general overview.

Code:
--- LEXICAL BNF ---

token = glom | possessive | qualifier | string

glom = glomstarter { glombyte }
glombyte = letter | digit | ~ @ # % _ $ & - + / | non-possessive '
glomstarter = letter | digit | ~ @ # % _ $ & '
letter = A..Z | a..z | extended ascii
digit = 0..9

possessive = ' preceded by S followed by non-glombyte | 'S non-glombyte
qualifier = ( printable-chars )
string = " printable-chars | nested-quotes "

mark = . , ; : ! ?
symbol = | * + - ^ / < > { } = extended ascii

noise = non-printable | space | tab | non-breaking-space
comment = \ chars cr
remark = [ printable-chars ]

--- ONE LEVEL UP FROM LEXICAL ---

noise = lexical-noise | comment | remark
integer-token = digit { digit }
ratio-token = integer-token / integer-token
mixed-token = integer-token - integer-token / integer-token
numeric-token = integer-token | ratio-token | mixed-token
nibble-token = $ { digit | A..F }
string-token = same as lexical
qualifier-token = same as lexical

--- SYNTATICAL BNF ---

program = { type | global | routine }

built-in-types = BYTE | BYTE POINTER | WYRD | NUMBER | FLAG | POINTER | RECORD | STRING | SUBSTRING | HEX-STRING
                          | THING | THING RECORD | THINGS | RATIO | NUMERATOR | DENOMINATOR

type = A name IS A type-name [ optional-info ] .
        = A name HAS fields .
        = A name IS number-token type-name .

optional-info = TO A type-name | WITH fields

fields = field-descriptor { pauses field-descriptor }
field-descriptor = ( A name | numeric-token BYTES ) { CALLED name | AT THE name | ( REFERENCE ) }

pause  = , | ; | AND | OR
pauses = { pause }

conjunction = AND | BOTH | BUT | EITHER | NEITHER | NOR | OR
preposition = IN | OF | ON | WITH | BEFORE | AFTER ... 

global = THE name IS A type-name [ optional-info ] .
            = THE name HAS fields .
            = THE name IS A type-name EQUAL TO constant-term .
            = THE name IS constant-term .

routine  = procedure | decider | function | callback
procedure = TO routine-name : employ-clause | statements
decider = TO DECIDE IF routine-name : employ-clause | statements
function = TO PUT A type-name 'S name INTO A type-name : employ-clause | statements
               = TO PUT THE name 'S name INTO A type-name : employ-clause | statements
callback = TO COMPATIBLY routine-name : employ-clause | statements

routine-name = { monikette | parameter | phrase } [ qualifier ]
monikette = any word except articles
parameter = A name [ CALLED name ]
phrase = THE name
employ-clause = EMPLOY routine-name .

name = { any word except articles, prepositions, conjunctions, verbs, operators, CALLED, EQUAL }

statement = privatize | loop | conditional | unconditional .
privatize = PRIVATIZE parameter-term .
loop = LOOP .
conditional = IF decider-call , unconditional { ; unconditional } .

unconditional = break | call | exit | intel | repeat | point | push | say
break = BREAK
call (internal) = { monikette | expression | phrase } [ qualifier ]
call (external) = CALL "dll-name" "entry-name" [ WITH expression { AND expression } ] [ RETURNING term ]
call (indirect) = CALL expression [ WITH expression { AND expression } ] [ RETURNING term ]
exit = EXIT
intel = INTEL nibble-token
point = POINT term TO ROUTINE { monikette | parameter | phrase } [ qualifier ]
push = PUSH expression
repeat = REPEAT
say = SAY flag-expression

expression = term { operator term }
operator = plus | minus | times | divided by | then

constant-term = negated-constant-term | posigated-constant-term | literal
negated-constant-term = - constant-term
posigated-constant-term = + constant-term
literal = numeric-token [ type name ] | string-token | nibble-token | YES | NO | NIL

term = negated-term | posigated-term | new-local | variable | literal-term [ AS A type-name ] [ / term ]
negated-term = - term
posigated-term = + term
new-local = A name [ CALLED name ] possessives
variable = THE variable-name possessives
literal-term = literal possessives

possessives = { possessives }
possesive = 'S ( field-name | function | target | magnitude | whereabouts )
 
Last edited:

Cogman

Lifer
Sep 19, 2000
10,277
125
106
They downloaded the thing and played with it. In fact, some of the people on that list paid $100 for the priviledge back when we charged for the system.

Well whoop de do. Once upon a time, software was distributed on floppy disks and this was a thing.

We are in a new age of software. If you are inventing a new programming language either distribute the source code for your compiler or die in obscurity (or release your source code and still die in obscurity... but the odds of that not happening are slightly better).

Some source code is not enough. If I can't download, compile, and run your compiler. I'm not going to run your compiler. No matter how many long winded speeches you give about how close minded I and everyone else here is.

Nothing you've said here has made me think what you are doing is a great idea. In fact, the opposite holds true. Your "Well it wasn't a problem for us, so you're wrong" sort of attitude is unsettling to say the least.

You have yet to produce any real benefits of using such a system. As far as I can tell from your examples, using your system will be more verbose, less readable, and you mention nothing about performance.

For me, it is a mark against a language that I have to write a full sentence to get it to do anything.

For example, show me how you would program something to handle the producer consumer problem.
 

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
Well whoop de do. Once upon a time, software was distributed on floppy disks and this was a thing.
And now this is the kind of thing we have to deal with: http://www.youtube.com/watch?v=_TNN9xV2MkI

We are in a new age of software. If you are inventing a new programming language either distribute the source code for your compiler or die in obscurity (or release your source code and still die in obscurity... but the odds of that not happening are slightly better). Some source code is not enough. If I can't download, compile, and run your compiler.
We recognize that. And that's why anyone who wants can download the whole shebang, including instructions, the source code, and the executable, for free, just for asking: gerry.rzeppa@pobox.com. (I'd put a link to the thing right here if they'd let me.)

I'm not going to run your compiler. No matter how many long winded speeches you give about how close minded I and everyone else here is.
Now you're confusing me. First you want it for free (no matter how much time and effort we've put into it); then, when I tell you how to get it, free, you say you don't want it.

Nothing you've said here has made me think what you are doing is a great idea. In fact, the opposite holds true. Your "Well it wasn't a problem for us, so you're wrong" sort of attitude is unsettling to say the least.
That's not quite what we said. Rather, "We (who have a great deal of experience programming both ways) prefer the latter; those who are experienced in only one of the ways of programming are by definition less qualified to hold an opinion on the matter, especially a strong one; reserving judgment and gathering additional first hand information would be a more prudent approach for them."

You have yet to produce any real benefits of using such a system. As far as I can tell from your examples, using your system will be more verbose, less readable, and you mention nothing about performance.
More "verbose", perhaps; "less readable", definitely not. And as for efficiency, we've managed to fit an entire stand-alone integrated development environment (including desktop, file manager, editor, dumper, native-code-generating compiler/linker, and wysiwyg page layout facility for documentation) into an executable that is less than a megabyte in size; and it can re-compile itself, on a bottom-of-the-line machine from Walmart, in less than 3 seconds. That's remarkably efficient by any reasonable standard.

For me, it is a mark against a language that I have to write a full sentence to get it to do anything.
On the other hand, we like it. Perhaps natural language programming simply isn't your cup of tea?

For example, show me how you would program something to handle the producer consumer problem.
Which solution would you like to see? Using semaphores? With monitors? Without either? It doesn't really matter. The underlying algorithms are, of course, the same in any language; we would simply express them in English (which the untrained observer would probably mistake for pseudo-code).
 

Cogman

Lifer
Sep 19, 2000
10,277
125
106
Which solution would you like to see? Using semaphores? With monitors? Without either? It doesn't really matter. The underlying algorithms are, of course, the same in any language; we would simply express them in English (which the untrained observer would probably mistake for pseudo-code).

Any, your choice. Just show me exactly what it would look like in your language.
 

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
Any, your choice. Just show me exactly what it would look like in your language.
Okay, here's a solution from Wikipedia in traditional terms:
Code:
semaphore mutex = 1;
semaphore fillCount = 0;
semaphore emptyCount = BUFFER_SIZE;
buffer buffer;
 
procedure producer() {
    while (true) {
        item = produceItem();
        down(emptyCount);
            down(mutex);
                putItemIntoBuffer(item);
            up(mutex);
        up(fillCount);
    }
}
 
procedure consumer() {
    while (true) {
        down(fillCount);
            down(mutex);
                item = removeItemFromBuffer();
            up(mutex);
        up(emptyCount);
        consumeItem(item);
    }
}

And here's a Plain English equivalent:

The mutex is a semaphore equal to 1.
The fill count is a semaphore.
The empty count is a semaphore equal to the buffer size.
The buffer is a buffer.

To produce:
Produce an item.
Decrement the empty count.
Lower the mutex. Put the item into the buffer. Raise the mutex.
Bump the fill count.
Repeat.

To consume:
Decrement the fill count.
Lower the mutex. Remove an item from the buffer. Raise the mutex.
Bump the empty count.
Consume the item.
Repeat.


I say "a" Plain English equivalent because you can format your code pretty much as you please with our compiler; I put the critical section on a single line to emphasize that it was the critical section, for instance.

Both examples, of course, require a number of supporting procedures. But I wanted to keep them equivalent so I "stuck to the script", so to speak. I also kept Wikipedia's names, for the most part, so it would be easier to see the equivalence; in actual practice I'd probably chose more natural and descriptive terms.
 

douglasb

Diamond Member
Apr 11, 2005
3,163
0
76
For someone who keeps extolling the virtues of "Plain English", you seem to have a hard time understanding it. What part of "we want to be able to compile your compiler ourselves" do you not understand? Obviously you had to write the thing in something other than "Plain English" originally, so let us see that source code in C or Assembly or whatever the heck you used to write it. That's what we're interested in.
 

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
For someone who keeps extolling the virtues of "Plain English", you seem to have a hard time understanding it. What part of "we want to be able to compile your compiler ourselves" do you not understand? Obviously you had to write the thing in something other than "Plain English" originally, so let us see that source code in C or Assembly or whatever the heck you used to write it. That's what we're interested in.
Many years ago we wrote a compiler for an Pascal-like language of our own design called AIQ (using an early version of Delphi). We used AIQ to write the first version of our Plain English compiler. But that was a very "bare bones" thing -- just enough editor and compiler so we could work exclusively in Plain English from that point on. (It was then we took the Osmosian oath: "I promise never to program in any language buy my own!" :) ) Every version since then has been created using nothing but the previous version of Plain English.

But you can compile our compiler -- in itself. In fact, the instructions tell you exactly how to do that on page 9. And if you're interested in more (intense) detail, look on page 88 where you'll see how to recompile the thing while producing a text-file listing of all the machine-code fragments that go into the executable. The EBNF description of the language can be found earlier in this thread, together with where to start in the compiler if you want to follow it through step by tedious step.
 

smackababy

Lifer
Oct 30, 2008
27,024
79
86
How do you, in plain English, show inheritance. And, how, in plain English, do you show you are using the parent's constructor method.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
I take that as a compliment. I've had Picaso's "Don Quixote" on my wall for years as inspiration. In fact, I painted and sold a unique colorized version of the thing just last year.

It's a great tale, but he was nuts, and he was still tilting at windmills.


Well, why don't you find out? Download the thing and see for yourself (as hundreds of others have). I hate to say it, but you're beginning to strike me as a bit closed minded here, Mark...

You might see it as close-minded, and I might see your position as unreasonable and stubborn. My system is very important to me. It has private information on it, and I use it daily for work. There are three kinds of executable programs that get run on it: 1) those I create; 2) those created by large reputable companies; and 3) those that have been used and attested to by large numbers of people that I trust. Even a cursory analysis of the situation will demonstrate that yours falls into none of those categories. Therefore it is not getting executed on my system.

And once again, the source, a description of our methods, and the working prototype are available to all for the asking: all they have to do is write me: gerry.rzeppa@pobox.com (I thought it more convenient to put the link right here, but, well, you've disallowed that).

Why didn't you just link to your page from the beginning? You have a page, and there's a link to the file on it. You can't be so new to the Internet as to not have suspected that a link to a .zip from a new poster would be viewed with suspicion, can you? In fact, we don't even allow new posters to self-promote a page, and a lot of other sites have the same policies. This is a very large and active forum. All sorts of idiots try to use it to promote all sorts of disreputable crap every day. It's not my job, nor that of the other admins, to vet you. You live within the policies or go away.

Now you're just being silly. No member is forced to read this thread. And I'm sure I could find stuff that is significantly less edifying if I took just a few minutes to look around this site.

Well now, by that standard I should allow anything to be posted, because nobody is forced to read it. I think we both know that's stupid. You're correct that no serious real time is being wasted, but we all value this place enough that I feel the statement is true in at least a metaphorical sense. If you're going to use up bits on our disk your post has to be worthy of it.

How about the EBNF for the language? I'll paste it in at the bottom of this post. Compiler enthusiasts should like that.

I'm not what you would call a compiler enthusiast, so correct me if I'm wrong, but doesn't the fact that you can construct an EBNF grammar for your language undermine the claim that it is natural? If it has to adhere to a strict grammar then is it not simply a more verbose syntax? And does that grammar not have to expand infinitely to accommodate new nouns and verbs? If it does, please explain why that is better than a general purpose symbolic language that is complete and can express any concept?

But it does; in fact, it's the only way to see the thing actually working. And you can read the documentation (a PDF) and look at the source code (plain text files) without running anything but Adobe's reader and notepad.

It's the only way to see the thing working because that's the only way you will consent to make it available. You have some reason for not wanting to make the compiler source available, and I don't really care what that is. Your compiled program is not getting run on my system. Maybe one of the other guys will fire it up in a vm. I haven't seen anything so far that would make me think it's worth the effort. You'll probably label that narrow-mindedness, or something, but I assure you I had to absorb four or five new ideas before lunch today. Yours just hasn't made the cut. If I weren't modding this forum I wouldn't have read past your first post.

Not what you expected, huh? Boy, we're outside the box now! But great, you've unzipped the thing. The executable is the whole thing, compiled; the six files without extensions (the desktop, the finder, the editor, the compiler, the writer, and the noodle) contain the source code. There are no extensions on the files because extensions are not very English-like and it is, after all, a Plain English compiler (more rebellion against the status quo!).

Wow, you are a piece of work, I'll give you that. Actually, I'll give more: you've been taking the heat here with grace and polite erudition, and that's not the most common attribute on the Internet. You seem like a human and a nice person, so please don't take any of this personally, but I remain convinced that you're not to be taken seriously. File extensions, by the way, are not there to serve your compiler, or any application program. Applications can presumably tell whether a given file is of a type that they can consume or not. Extensions are there for operating systems and people. So now your fight against the status quo apparently extends to the violent elimination of all hierarchical naming systems? I thought you were making it easier for humans to program?
 

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
How do you, in plain English, show inheritance. And, how, in plain English, do you show you are using the parent's constructor method.
We think the whole object-oriented paradigm was a big mistake. A good article on the subject can be found here:

http://harmful.cat-v.org/software/OO_programming/why_oo_sucks

Our compiler does, however, support a kind of "record extension" much like Wirth's Oberon. This Plain English type defintion, for example:

A roundy box is a box with a radius.

says that a roundy box has all the fields that a box has, plus a radius (for the corners).

But we keep our nouns and our verbs strictly separate, as Joe recommends in the article linked above, and don't try to make artificial hierarchies (or networks) of them. Think about it minute. Say I've got an oven and some cookies and I want to bake them. Should I say "oven.bake(cookies)" or "cookies.bake(oven)?" or something else? How about the obvious (in Plain English):

Bake the cookies in the oven.

Our version of "constructors" and "destructors" are described in the tutorial section of our manual on page 27, and in the reference section on page 93.
 

Gerry Rzeppa

Member
Dec 13, 2013
195
1
76
www.osmosian.com
My system is very important to me. It has private information on it, and I use it daily for work. There are three kinds of executable programs that get run on it: 1) those I create; 2) those created by large reputable companies; and 3) those that have been used and attested to by large numbers of people that I trust. Even a cursory analysis of the situation will demonstrate that yours falls into none of those categories. Therefore it is not getting executed on my system.
If everyone thought like you, how would a program developed by an individual or small group ever make it into your category (3)? And by those standards, it appears you wouldn't run our program no matter how or where we posted it -- at least not until "large numbers of the people you trust" took the risk for you. Sounds to me like you need a junker laptop or something to try new stuff on. (Email me your address and I'll send you one with our compiler pre-loaded.)

Why didn't you just link to your page from the beginning? You have a page, and there's a link to the file on it.
Yes, there's a page, but there's no link to the system on it; you have to email us to get that. Why the extra step? To separate the wheat from the chaff; those who want to seriously further the investigation from the troublemakers and the merely curious. You've seen the kind of responses we get here from the world at large; you've also seen, in an earlier post of mine, the kind of responses we get from people who are forced to take that extra to get a copy of the thing. A world of difference, to be sure.

You can't be so new to the Internet as to not have suspected that a link to a .zip from a new poster would be viewed with suspicion, can you?
Again, it's a means of separating the wheat from the chaff. When someone is really interested in something, they'll do what it takes to find out more about it.

If you're going to use up bits on our disk your post has to be worthy of it.
Perhaps I'm reading the stats wrong, but when I go to the list of threads in this forum (AnandTec Forums > Software > Programming) and sort by views, I see that this thread has had 1,148 view since I posted it less than a week ago. It's in the top 15 (not counting the stickies). And when I sort by number of replies, it's in the top 5. And even if you don't count my replies, it's still in the top 10. I think this is a subject that interests your members; we know it's a subject that at least some members feel very strongly about. Probably worth the disk.

I'm not what you would call a compiler enthusiast, so correct me if I'm wrong, but doesn't the fact that you can construct an EBNF grammar for your language undermine the claim that it is natural?
It's a shortcoming, yes. Like the fact that most airplane wings don't flap. But that doesn't mean most airplanes don't resemble (and fly) like birds. Besides, the recursive descent parsing that our compiler performs based on the EBNF is only the first (very rudimentary) pass at the code; the second and third passes are made in a more ad hoc fashion consistent with the principles I've described here. And it should be noted that the EBNF gets smaller, not larger with each version. The current EBNF is 108 lines; the original was over 300.

If it has to adhere to a strict grammar then is it not simply a more verbose syntax?
If that was all there was to it, yes. But see the response immediately above.

And does that grammar not have to expand infinitely to accommodate new nouns and verbs?
No. The "keywords" of the language are articles (the, a, an, some), conjunctions (and, or), prepositions (in, on, over, etc), and a small collection of general state-of-being verbs (is, has, does, etc); less than 150 in all. The nouns, verbs, and adjectives are defined by programmer.

If it does, please explain why that is better than a general purpose symbolic language that is complete and can express any concept?
Which general purpose symbolic language? Ah, there's the rub. Some people like this one, some that. And, objectively speaking, they're both right, some of the time: this language is better for certain kinds of things, while that language is better for other things. So we didn't want to simply enlarge that set. Instead, we wanted to see how people would program (ie, communicate with a computer) if they could do it in the way that came most naturally to them. And what we've concluded is what I said at the very top of this thread: We believe, if it were possible, people would communicate with their machines in "math book" style. Mostly natural language, with snippets of specialized syntax (and even graphics) when that proved to be a more convenient way of expressing themselves. And why do we think this is the case? Because that's how we all do it when we don't have any artificial restrictions placed on us. That's how Einstein did it when he was telling people about relativity; that's how the characters on Sesame Street do it when they're telling kids about phonics.

And so we designed and implemented a prototype of the neglected part -- the part that compiles and executes English. Extending our compiler to parse, for example, infix (or prefix or postfix) symbolic mathematical equations is a trivial thing -- but extending, say, C++ to handle what we can handle, is not. And we intend to make just such extensions, at least where the syntax is more-or-less common to people in general (infix math expressions, for example, are generally understood even by non-programmers; C-style loops are not). And for the rest, well, that we can "farm out" to others, like this:

To display a graph of a really complicated mathematical function:
Clear the screen.
Ask Mathematica to return the graph of the really complicated mathematical function.
Draw the graph in the center of the screen.


So the advantage is that Plain English, or something like it, turns out to be the last programming language; with all the others specialized subsets, inserted when and where they're needed.

You have some reason for not wanting to make the compiler source available, and I don't really care what that is.
But it is available. You have it. It's in the text file you downloaded called "the compiler".

Your compiled program is not getting run on my system. Maybe one of the other guys will fire it up in a vm. I haven't seen anything so far that would make me think it's worth the effort. You'll probably label that narrow-mindedness, or something, but I assure you I had to absorb four or five new ideas before lunch today. Yours just hasn't made the cut. If I weren't modding this forum I wouldn't have read past your first post.
But if you were only modding this forum, you wouldn't be writing so much. Having deleted my link, your work as a moderator was more-or-less done.

Wow, you are a piece of work, I'll give you that. Actually, I'll give more: you've been taking the heat here with grace and polite erudition, and that's not the most common attribute on the Internet. You seem like a human and a nice person...
Thanks.

...so please don't take any of this personally, but I remain convinced that you're not to be taken seriously.
No offense taken.

File extensions, by the way, are not there to serve your compiler, or any application program. Applications can presumably tell whether a given file is of a type that they can consume or not. Extensions are there for operating systems and people.
Operating systems that were developed in the last century, perhaps, and people who have become accustomed to their archaic way of doing things. Out here in the real world we regular folks have other and more natural ways of categorizing and identifying things than extensions. And with today's computing power, there's no excuse (or need) for such primitive methods. Next you'll be telling me that this "edit here / preview there" approach to entering posts on this forum is a good thing, and that wysiwyg was a fad!

So now your fight against the status quo apparently extends to the violent elimination of all hierarchical naming systems? I thought you were making it easier for humans to program?
We're not against hierarchical naming systems when (a) they're warranted, and (b) they're implemented with some degree of elegance and finesse. Most are not.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,243
3,831
75
Snake oil or not, I'm not selling anything. Our development system is free for the asking, and open source to boot.
The source being available doesn't make it Free Software. I saw something in a PDF about "reasonable licensing terms". License it with the GPL or BSD, and then I'll believe it's Free.

@Markbnj, the compiler's source is in the language it compiles. It compiles itself - which is not entirely remarkable. The remarkable thing is that it is the only compiler which compiles the language it's compiled in.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
The source being available doesn't make it Free Software. I saw something in a PDF about "reasonable licensing terms". License it with the GPL or BSD, and then I'll believe it's Free.

@Markbnj, the compiler's source is in the language it compiles. It compiles itself - which is not entirely remarkable. The remarkable thing is that it is the only compiler which compiles the language it's compiled in.

How is that different than compiling GCC using GCC?

This guy didn't just write a couple of text files, run them and then all of the sudden have a 'compiler'. He had to start somewhere, using someone else's tools to build the first version of his compiler.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
@Markbnj, the compiler's source is in the language it compiles. It compiles itself - which is not entirely remarkable. The remarkable thing is that it is the only compiler which compiles the language it's compiled in.

It's not remarkable that the compiler is bootstrapped. There have to be 25 or 30 languages, including all the major ones, for which the original compiler was bootstrapped. So you're right, it's not really about the compiler source, per se. For me it's more about the whole package of how it's presented. My instincts don't lean toward censoring stuff, so the OP is welcome to seek converts for his secret order as long as he adheres to the rules, but I see nothing to warrant further interest on my part. When I see it on Github and HackerNews I'll give it another helping of attention span.
 
Status
Not open for further replies.