192-168.co.uk: The musings of a geek
Home | About Me Login | Register
Chris Baish, on 29-08-2017 at 22:23 GMT said:

cantabscript

Possibly the worst programming language in the world.

Origins of cantabscript: cantabscript was created out of a joke suggestion to use MS Word as an IDE, in the Cambridge University Computer Science Freshers 2017 chat. The initial ideas were to use fonts for syntactic purposes, colours for types, and for the final output source to be a docx file. From there, we decided to implement it as a scripting language which transcribes to Python (for portability), and thus this project was born. The code repo can be found here

Syntax

The syntax rules are fairly simple:

  • The program must start with “START THE PROGRAM” and end with “END THE PROGRAM THANK YOU
  • Each section (akin to a function or procedure) must start with “THIS IS THE [PROCEDURE NAME] [BIT in windings 1 font]” and end with “THIS IS THE END OF THE [procedure name] [BIT in windings 1 font]”
  • Variables are declared via the construct “I [WANNA|WANT TO] HAVE A VARIABLE %[name of variable] WITH CONTENTS [VALUE]
  • Strings are started with a # and terminated with a £. There is no escaping of literal characters (yet)
  • Loops are declared with “COUNT TO [n] AND DO STUFF AT THE SAME TIME” and terminated by “STOP COUNTING”
  • Lines are printed to stdout with “WRITE OUT %[variable name]”
  • Every 5th line must end with “PLEASE” (Manners are important)
  • Every 15th line must end with either “KEEP GOING” or “YOU CAN DO THIS!” in order to motivate the computer
  • True is “NOT A WORD OF A LIE” and False is “FAKE NEWS”
  • If statements are “I'M INDECISIVE IS [condition] [THE SAME AS|NOT THE SAME AS] [NOT A WORD OF A LIE|FAKE NEWS]” and then “DECISION MADE” at the end of the block
  • Else statements are “DECISION MADE BUT IF NOT STILL DO STUFF” and then ended by “DEFINITELY DID STUFF”
  • All of the above are open to adjustment and alteration as we go along, comments and suggestions welcome


    Comments

    There don't seem to be any comments yet. Please add one below to start the conversation.

    Please login to post a comment