real language

Bookmarking Digg Diigo DZone Earthlink Google
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Plain English

Author:The Osmosian Order
Score: (3.01 in 151 votes)
To sing the beer song:
  Put 99 into a number.
  If the number is 0, break.
  Format a string given the number and "bottle" and "bottles".
  Write the string then " of beer on the wall, " then the string then " of beer.".
  Format another string given the number minus 1 and "bottle" and "bottles".
  Write "Take one down and pass it around, " then the other string then " of beer on the wall.".
  Skip a line.
  Subtract 1 from the number.
  Write "No more bottles of beer on the wall, no more bottles of beer.".
  Write "Go to the store and buy some more, 99 bottles of beer on the wall.".

To format a string given a number and a singular string and a plural string:
  If the number is 0, put "no more " then the plural into the string; exit.
  If the number is 1, put "1 " then the singular into the string; exit.
  Put the number then " " then the plural into the string.

Download Source | Write Comment

Alternative Versions


>>  FMaz said on 04/29/06 00:38:05

FMaz I still prefer the whitespace language... it's a way more simple to read.
plain english has too much text, my eyes gets tired really fast.

>>  Chris Steffen said on 09/25/06 18:00:58

Chris Steffen This source code was WAY too vague. I had to set my compiler to "interpretive mode" so as to not make mistakes as to which string you were talking about when, and what you wanted me to do, exactly.

Dangerous work.

>>  Jacques Troux said on 01/03/07 02:39:01

Jacques Troux Worst language ever.

>>  Freddy said on 01/03/07 13:15:34

Freddy What absolute rubbish.

>>  Gerry said on 01/06/07 21:55:41

Gerry It curious that all of the comments so far - both pro and con - have been written in Plain English! :)

>>  The Grand Negus said on 01/11/07 23:29:22

The Grand Negus By the way, the Plain English Compiler is written entirely in Plain English and can recompile itself - with all of its development tools - in less than 3 seconds on a bottom-of-the-line Dell.

>>  Sam said on 07/05/07 11:32:29

Sam Evil

>>  Adam R. said on 08/14/07 08:43:38

Adam R. Uhm, wtf, how can it recompile itself? That's like...writing PHP5 in PHP5. Impossible.

>>  fruttenboel said on 08/24/07 00:44:26

fruttenboel Apparently the 'Plain English' source code was written after the last bottle was taken off the wall.

>>  The Grand Negus said on 08/31/07 11:02:15

The Grand Negus Adam R: Write me ( and I'll show you how Plain English can recompile itself. No cost or obligation. It's not quite like writing PHP5 in PHP5; it's like writing PHP5 using PHP4.

>>  Ben Standeven said on 10/13/07 00:44:47

Ben Standeven I can't seem to get this program to work right; it just keeps printing these lines:
"99 bottles of beer on the wall, 99 bottles of beer."
"Take one down, pass it around, -1 bottles of beer on the wall."
"Go to the store, buy some more, 99 bottles of beer on the wall."

Is there something wrong with my compiler?

>>  Doug Bell said on 10/19/07 20:27:31

Doug Bell One of the main tasks of a programming language is to "bootstrap the compiler", which basically means to write an X compiler in the X programming language.

If the language is sufficiently powerful, it's possible.

>>  Frank Eriksson said on 01/13/08 13:38:33

Frank Eriksson This was intresting but is there a free compiler around somewhere?
if not i will create one...

visit my blog at: and tell me if you are with me ;-)

>>  calle94-1337 said on 01/14/08 17:00:54

calle94-1337 Is'nt it frre? i got it from ? it seams to be fixeb to fulscreen windows appz. ca'nt u make on for linux?

>>  Scott said on 04/03/08 06:47:12

Scott GCC (C++ compiler) was written in C++

>>  Pieter said on 01/16/09 18:02:05

Pieter Genius!

>>  NeXus said on 01/23/09 18:29:38

NeXus Go away, please.

>>  Ghost said on 02/06/09 13:05:42

Ghost That is... fantastic!

>>  CodeGecko said on 04/29/09 10:27:16

CodeGecko if (this.code == System.Types.Rubbish) {
//Stick to C#

>>  Frank Eriksson said on 05/06/09 01:37:00

Frank Eriksson @CodeGecko: Meeh, C# sucks ;p

Hehe, I remebered this :) I was talking about High-level and Low-level languages in programming.

And I said that this language must be the most "Highleveleisht" that I know about.
But this language is a bit nutty or something, not entirely raw plain English, but rather a strict subset. And it's a bit strange from a programmers angle of vision; no need to give a variable a name:
Put 99 into a number.

That could be named as a Anonymous variable or something like that. It's a really interesting idea, I tried to download it under the link calle94-1337 said, but as he says it probably wont work for Linux, it seems like "the noodle" ( yummy, noodles. chicken or beef? ) is strictly aimed at windows, including lots of inline assembly code:
intel $8B00. \ mov eax,[eax]

I have just started to read the pdf-file, and I have to say that I'm rather impressed already on page 5!

It's a shame that the version is still in 3037 after three years, And I would be happy to see the bootstrapping compiler ( if it's written in C or some other understandable language :) as I am trying to implement a language of my own using flex and bison. I have a big problem trying to make flex and bison understand something that is soo logic and crystal clear...

The syntax is not like C (++) or Java ( maybe just a little bit ) or anything I've seen. It's intended to be pretty high-level avoiding smalltalk ( haha, funny me ).

But still very logic so that I one day can learn my sister programming :)

Well, thanks for the talk :p

Back to gaming :)

>>  The Grand Negus said on 05/11/09 05:02:46

The Grand Negus Frank Eriksson,

If you'd like more information about Plain English, just write to us directly ( We'll be happy to assist you.

Regarding the "bootstrapping compiler" you mentioned, I'm afraid it is now lost in the annals of programming history. It was a Pascal-like language of our own design and was implemented using a very tiny subset of Borland's Delphi. We employed it briefly to produce the extremely minimal CAL-1000 (our first Plain English development system) and then immediately abandoned it. At that point we took the Osmosian Oath ("I promise never to program in any language but my own";) and used the CAL-1000 to develop the more robust CAL-1001, entirely in English. The CAL-1001, in turn, was used to produce the more capable CAL-1002, again in English, and so forth, all the way up to the fully functional CAL-3037, which we released as a commercial product. It's successor, the CAL-3040, is currently in testing.

But the really interesting work is about to begin as we enter Phase II of our project and use the the last of the CAL-series compilers to create the initial incarnation of our "apparently intelligent"(tm) machine, the PAL-1000.

Again, don't hesitate to write.

Your Friendly Neighborhood Negus

>>  Frank Eriksson said on 07/03/09 08:49:28

Frank Eriksson Hello Everybody!

Nice to see that the project isn't dead after all :)

I shurely likes the idea of the Plain English Language, but my brain is pretty damaged after years of programming in various odd languages ( like php, java, gml [ yuck! ] ).

And thats why I wants to implement my own language, I was a bit on the way doing it before my HP laptops motherboard fryed because of a defect in the computers bios ( that is present in several series of HP laptops, watchout! update your bios if u ownz one! )

So I lost tons of data ;(

Right now I'm leaning towards a mixture between lua, python and [ Highlevel ] C++.

I wants to have a language that supports the bleeding edge of hardware, is fast to learn, write and read. Is able to be written in a sort of interactve mode. Can both be compiled and intepreted.

Remember: eval is evil!

I'm gonna write to you [The Grand Negus] by mail, soon :p

Best regards!
Frank M. Eriksson

>>  nJORL said on 09/19/09 20:39:11

nJORL Hmm, the code is okay, but I'd prefer it better commented.

>>  Joio said on 09/24/09 18:26:46

Joio Adam R. you're an asshole. Selfhosting is an implementation of most languages and a property of any turing-complete one (nearly 100% of them). Know before you talk!

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!




Security Code: