-
Notifications
You must be signed in to change notification settings - Fork 9
Gob's Program Specification
Changes from 1.0
- Clarification of output format - Issue #3
The first visible output from your code should be the text:
Gob's Program: Y/N?
This must be followed by an explicit newline, if your programming language does not add one. Note the double space between the colon and the "Y/N". Both words should be capitalised.
For strict accuracy, the screen should be cleared and output commenced from the lowest visible line, but this may be omitted in the interests of clarity of code, since the screen display will be scrolled clear in short order.
The input prompt is a single question mark followed by a single space.
?
The program should pause indefinitely at this point, awaiting user input. All user input should be echoed back to the screen. Interrupt handling is at the programmer's discretion. The program should resume and input should be processed immediately upon the user hitting "Enter" or an equivalent key.
The main program loop should be entered into if the user provides a "Y" in response to the above prompt. Case-sensitivity is not recommended. A response of "N" should exit the program immediately. Whether to accept longer forms of answer such as "Yes", "No", "No way", "Yahoo!" as confirmation or denial based on the first character of the input is at the programmer's discretion.
A negative response, "N", should result in the program immediately terminating with extreme prejudice.
Invalid input that cannot be interpreted as either a "Y" or "N" response should return to the initial state of the program, and repeat the first output line and prompt again. In the interests of code clarity, it is acceptable to treat anything other than an explicit positive as a negative, and exit immediately.
The final output of the program should be the text string "Penus" followed by a double space.
Penus
This MUST NOT be followed by a newline. This output should be repeated indefinitely. There is no exit condition or further prompt for user input. Interrupt handling is at the programmer's discretion.
On most displays, a repeated 7 character string will not split cleanly at screen boundaries, as seen in the reference footage, where a 40-column display produces neat columns.
Penus__Penus__Penus__Penus__Penus__Penus
Penus__Penus__Penus__Penus__Penus__Penus
Penus__Penus__Penus__Penus__Penus__Penus
Penus__Penus__Penus__Penus__Penus__Penus
For this to occur, the final double space must be omitted, or the output will 'staircase'.
Penus__Penus__Penus__Penus__Penus__Penus
__Penus__Penus__Penus__Penus__Penus__Pen
us__Penus__Penus__Penus__Penus__Penus__P
enus__Penus__Penus__Penus__Penus__Penus_
A staircased output is not a blocker, and should not be considered a reason to reject a submission. It is an acceptable initial draft for a previously non-existant implementation, but patches to rectify the output to a screen-accurate format should be accepted, and if multiple implementations of a language exist, one using column output should be given preference over staircased output.
In keeping with the desired goal of screen accuracy, there are several options to approach this.
- Determine the line length of the display environment and print as many "Penus" occurrences as will form columns and return a newline before overrunning.
- Assume a 40-column display and output the exact string required to fill it, then loop.
- Full emulation of a Kaypro 10 system running in 40 column mode and writing Gob's Program in any available interpreted language of the era.
This list is not intended to be exhaustive.