GolfScript

GolfScript is a stack oriented esoteric programming language aimed at solving problems (holes) in as few keystrokes as possible. It also aims to be simple and easy to write.

Short code is achieved by using single symbols to represent high level operations (such as map, join, array size, etc). Being stack based allows for functions and other manipulations to work without the need for explicit variables, however variables still exist and are useful for more complicated stack manipulations.

To learn GolfScript, start with the tutorial and download the implementation. After you are comfortable with it, you may want to check out exactly how code is parsed and see all of the built ins.

If you have any suggestions or find any bugs please email me at golfscript at golfscript.com.

news

  • Dec 31: Ah major bug with new input method fixed.
  • Dec 26:
    • Interpreter made compliant with ruby 1.9.
    • If no input is provided, uses empty string instead of waiting for user input.
    • New operators ( ) added.
    • ~ applied to an array now dumps elements onto stack.
    • New % behavior added. Array Array % now acts like / but with empty results removed.
  • Dec 19: Bug fix, unpack('c*') caused binary characters to be negative.
  • Dec 14: GolfScript is 53rd language added to shinh's golf server. Thanks shinh! Currently the number one ranked language's average score is about 7000, let's see how much we can make it drop.
  • dec 13, 2007: GolfScript released!