Thread: English: The programming language

  1. #1
    Amazingly beautiful user.
    Join Date
    Jul 2005
    Location
    If you knew I'd have to kill you
    Posts
    254

    English: The programming language

    I hacked together an "English Interpreter", so that you can write a program in "English," and have the computer "understand" it.

    You need to write sentences in the proper syntax, and the language is severally limited (no nested loops, or debugging support).
    Its got a few example programs that you can copy and paste, or you can just write "instructions" in the box and hit the button to run.

    It's written in HTML/Javascript (sorry its not compliant, but maybe once I get around to it), so the webpage is the source code. Watch out, it's a mess.

    Let me know what you think.

    http://tevlog.com/magic.html
    Programming Your Mom. http://www.dandongs.com/

  2. #2
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    Whats the syntax list for this "English"?

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    465
    Not anything special. Just another language with different syntax. Something really cool would be to make it a dynamic interpreter with a sort of 'undefined' syntax. That way you could write out what you wanted the program to be and the compiler would make it so. Now, it just has excessively long syntax.
    Last edited by cerin; 06-07-2007 at 10:48 PM.
    My computer is awesome.

  4. #4
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Quote Originally Posted by cerin View Post
    Something really cool would be to make it a dynamic interpreter with a sort of 'undefined' syntax. That way you could write out what you wanted the program to be and the compiler would make it so. Now, it just has excessively long syntax.
    Perl is like this in some ways with the several varieties of almost every keyword.
    Sent from my iPadŽ

  5. #5
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Hmm perhaps turn it into something useful like a pseudo-code compiler or something

  6. #6
    Registered User
    Join Date
    Dec 2004
    Posts
    465
    Quote Originally Posted by SlyMaelstrom View Post
    Quote Originally Posted by cerin View Post
    Not anything special. Just another language with different syntax. Something really cool would be to make it a dynamic interpreter with a sort of 'undefined' syntax. That way you could write out what you wanted the program to be and the compiler would make it so. Now, it just has excessively long syntax.
    Perl is like this in some ways with the several varieties of almost every keyword.
    What? You mean interprets what you type? Or has excessively long syntax? :P
    My computer is awesome.

  7. #7
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Quote Originally Posted by cerin View Post
    What? You mean interprets what you type? Or has excessively long syntax? :P
    The latter, but of course, that is what it would take in order to make a programming language that can properly interpret plain English instructions.
    Sent from my iPadŽ

  8. #8
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    Quote Originally Posted by cerin View Post
    Something really cool would be to make it a dynamic interpreter with a sort of 'undefined' syntax. That way you could write out what you wanted the program to be and the compiler would make it so.
    This exists: it's called declarative programming (more on that here.)

    The general idea is this, though: you describe what you want, rather than how to get it (you can think of the code more as a formal proof specifying the result itself, rather than specifying an algorithm that will acheive the result. You go from defining the process of getting from A to B to just defining B.)
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  9. #9
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    I wonder, does part of the definition of a "declarative programming" solution garuantee that a solution is always implemented using the best possible algorithm?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 28
    Last Post: 10-30-2008, 03:52 PM
  2. Language of choice after C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 47
    Last Post: 06-15-2004, 01:20 AM
  3. English as a second language
    By ober in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 04-09-2004, 07:29 AM
  4. Language Script..
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 03-30-2003, 06:48 AM
  5. The devaluation of the English (or American) language
    By Aran in forum A Brief History of Cprogramming.com
    Replies: 36
    Last Post: 09-03-2001, 02:12 PM