I'm working on modernizing Rosetta Code's infrastructure. Starting with communications. Please accept this time-limited open invite to RC's Slack.. --Michael Mol (talk) 20:59, 30 May 2020 (UTC)

Category talk:Plain English

From Rosetta Code

Clutter?[edit]

I am concerned that this "language" clutters up the place (RC). It seems to me that each entry is merely a bare-bones re-telling of the Task Description. On the plus side, this language does supply some stress relief and some levity. I'm not encouraging anyone to remove it, but if it was decided to omit it, I could understand why.

I await the first "alternate" Plain English entry, where another description of the algorithm points out how the "program" can be made more efficient or faster...

And if "Plain English" does stick around, will others, such as "Français Ordinaire", "Español Llano", and the like, step up to be counted? That might make RC very cluttered. --Enter your username (talk) 06:26, 16 September 2020 (UTC)

You're annoyed Plain English programs look like task descriptions? I am sure the language creators would consider that high praise. You seem to be under the impression that this language is a toy or a joke. I invite you to take a look at Plain English's compiler, which is written in Plain English. It may quickly alleviate you of that impression, as it did me. I wouldn't be submitting examples for this language if I didn't believe it is a serious language with something to offer.
Regarding your concerns about efficiency, I am somewhat mystified why this is even a concern for the (intentionally) trivial tasks I have been submitting to (for now). How much more efficient would you like basic language constructs, loops and type conversions to be? --Chunes (talk) 11:36, 16 September 2020 (UTC)
I have looked at the Plain English compiler written in Plain English, and it's nice, very nice indeed. But where would one find a working executable compiler? Without one, it's hardly possible to test that any of the task implementations actually work correctly.
I have found and tested two executables purporting to be a working Plain English compiler: cal-3040.exe and cal-4700.exe, found at [1] and [2] respectively.
The former appeared to work at first, seemingly being able to compile the compiler itself, producing an executable named osmosian.exe in the compiler folder, which works exactly as the original cal-3040.exe. In fact, it is exactly the same file, byte for byte. And that was a bit suspicious, so I tried the "official" sample program source.txt obtained from [3]. And I was not very surprised when the result of compiling source.txt was again an executable named osmosian.exe; again a byte-for-byte copy of cal-3040.exe. In other words, the compiler didn't compile anything, it just created a copy of itself named osmosian.exe. Impressive.
Edit "the finder" line 395 from "item" or "items" to "iteM" or "iteMs" and repeat (R/Run in cal-3040-orig.exe). You should now have a cal-3040.exe which shows that capital M top right, which does not go away if you undo those edits (until another R/Run). --Pete Lomax (talk) 19:26, 20 September 2020 (UTC)
Very well. Now the question is, how to compile and run any other program than the compiler itself? --Dick de Bill (talk) 20:22, 20 September 2020 (UTC)
Then I looked for another version of the compiler, thinking maybe cal-3040.exe is just buggy, and I found cal-4700.exe. The name suggests it is a newer, better version. Indeed, this one has a new feature – it only makes a copy of itself when ran on its own source. When compiling source.txt, it showed an error message I need a routine to 'initialize before run'. and besides that produced no output. Then I tested a few task implementations from RC. I picked those which were supposed to produce output, and thus prove that the program – and hence the compiler – works correctly. These tasks all contain a definition To run:, and they all ended up in an error message Error in the desktop. I already know how to 'run'. without producing any other output.
At this point I am having a hard time believing this language is not a joke, though I hope I am wrong because the idea is enticing and someone has obviously put extraordinary effort into the whole... thing. There's 120 pages of documentation and a grammar description in EBNF; source code of the compiler which is over 23,000 LoC (excluding empty lines and comments); there's the executable "compiler" which is more of an IDE, with user interface providing such functionality as copying files, creating new folders, sorting or reversing selected lines of a file and all kinds of stuff that one would not expect even from somewhat advanced text editors; there is a rather sizable blog [4]; and then there is the mentioned sample application, with source code, and an executable which actually works... (but was it compiled from the Plain English source or written in another language?) It seems there's pretty much everything, except a working compiler. And under these conditions, I consider Plain English clutter. --Dick de Bill (talk) 18:25, 20 September 2020 (UTC)


Added a discussion link to the main page. While this is not really my cup of tea, it is quite wrong to suggest or imply this is not a "real" programming language. --Pete Lomax (talk) 15:49, 16 September 2020 (UTC)


Ah, the clue train shows signs of slowing down to a stop for me. It seems that I had only come across the PE examples at RC where the task description did not require output. I eventually spotted one with output, and noted that the PE source was indeed substantial enough to accomplish the task. I apologize for the disparaging remarks I made about PE. I stand corrected, not clutter. --Enter your username (talk) 17:25, 16 September 2020 (UTC)

cannot run any examples[edit]

Clearly we all need some extra help here. --Pete Lomax (talk) 01:53, 21 September 2020 (UTC)

All of the examples I have submitted to Rosetta Code compile and run with cal-4700.exe. Here are some sticking points that folks may be running into:
  • It only works in Windows.
  • The compiler only compiles source code with extensionless filenames. ¯\_(ツ)_/¯
  • A copy of the noodle must be present in the same directory as your extensionless source filename. Yes, this means you need to copy it from the main directory to your project directory. Unsophisticated, but such is life. The noodle is a simply another source file that acts as a standard library of sorts.
Here is an example of my workflow.
  • Open cal-4700.exe. I have it in C:\Users\Chunes\Code\Plain English\.
  • Using the arrow and enter keys, navigate to C:\Users\Chunes\Code\Plain English\.
  • Use the arrow keys to highlight "the noodle" and press ctrl-c to copy the file to the clipboard.
  • Using the arrow and enter keys, navigate to C:\Users\Chunes\Code\Plain English\Work\Rosetta Code\ which is where my Plain English RC projects live.
  • Press the "N" button with the mouse and create a new directory. Name it "arithmetic-mean" for example.
  • Navigate to the new folder.
  • Press ctrl-v to paste the noodle into this folder.
  • Press the "N" button with the mouse and create a new file (for the source code). Name it "arithmetic mean". (No extensions, remember.)
  • Navigate to the newly created source file and press enter to open it for editing.
  • Now type/copy the source code into this file.
  • Press ctrl-r to compile and run the program. This will also drop the executable file in the same directory as your source code. --Chunes (talk) 10:04, 21 September 2020 (UTC)
Excellent, thanks. I've just made User_input/Text#Plain_English runnable. --Pete Lomax (talk) 11:34, 21 September 2020 (UTC)
Regarding that particular task, I think it would be quite helpful if the Plain English implementation demonstrated how to save the user input into variables, like other implementations do. --Dick de Bill (talk)
Oh, but is has. Any time you see a/an/some whatever inside a routine body in Plain English, that is introducing a new variable into the routine's scope. To refer to a string and a number you would say the string and the number. (When you see a/an/some whatever in a routine header, that is a parameter.) --Chunes (talk) 09:23, 22 September 2020 (UTC)
However, I see how it can be confusing, so I have updated the task to show how to refer to the values read from the console. --Chunes (talk) 09:43, 22 September 2020 (UTC)
The above workflow should be in Hello_world/Newbie! (but of course "beautified") Hmm... I guess I'll try to write the initial write-up. --Simple9371 (talk) 08:25, 28 November 2020 (UTC)
Thanks for volunteering to work on that. Here's a little improvement to the flow that I have since learned. The IDE is kind enough to copy the noodle to the current directory when you press ctrl+v in the file navigator (while maintaining the existing contents of your clipboard elsewhere). So all you have to do is press ctrl+v wherever your source file is to put a copy of the noodle there. --Chunes (talk) 09:48, 28 November 2020 (UTC)

EBNF[edit]

Does anyone know of a program that will read this file and generate a graphic version of the Plain English language's EBNF?
--GarveyPatrickD (talk) 22:15, 10 June 2021 (UTC)