Skip to content

Piratical Programming Language - specification (humour)

License

Notifications You must be signed in to change notification settings

allmedia-nz/ppl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

ppl

Piratical Programming Language - specification (humour) // A piratical programming language makes use of commonly used pirate terms to make programming more enjoyable. // Main concepts // Variables names are enclosed in single quotes eg 'module' // The reserved word "me" is not parsed and has no meaning but makes the code more piratical. // all statements end in the reserved word "Arrgh!" // "Avast!" is a halt command like end, Scupper = exit // Try = "Maties" Catch = "Swabs" // A ppl module is a "Good Ship" it includes // With Booty = parameters // Parley = require/include and APIs // The "Scurvy Crew" (user) object is native // Stowage = data structures private to the ship or shared by parley // A "Spanish Main" loop or a "Barbery Coast" single pass through // The main logical values are not true|false but port|starboard // Program flow follows a voyage metaphor // Named code blocks are traditionally named after coves and pirate towns but are private to the ship // Me Good Ship 'Module' With Booty 'parameter1' and 'parameter2' Avast if Booty be empty and Scupper 'Module' Arrgh! Parley Ahoy Maties: 'Module1' from "http://..." Avast Swabs, Scupper 'Module' Arrgh!   Ahoy me Hearties 'Data' from "http://..." Avast Swabs, Scupper 'Module' Arrgh!   Ahoy Bucko: 'API' from "http://..." Avast Swabs, Scupper 'Module' Arrgh! // Maties = modules no errors / Swabs = errors // Hearties = data no errors // Bucko = API no errord // Scupper= escape Module if ahoys fail Arrgh! Stow // define data
'text':pieces of eight;
'int var': dubloon;
'float var': real;
'datetime': watch;
'location': map;
'binary': bearing; // reserved words port or starboard
'user': crew; // user object
'object':chest;
'table': treasure of 'object';
'function': jollyboat of bearing Assay 'location'.long.>=0
set bearing of "function' to port,else starboard;
Heave the jollyboat arrgh! // heave is end of jollyboat 'Module' Arrgh! Swab the decks Arrgh! // swab the decks void all //-------------------------------------------------------- Weigh anchor on the Spanish Main Maties // Weigh anchor = Begin// Spanish Main = main loop, // Barberry Coast = no loop // Maties until error Beat crew to quarters arrgh! // log all users out Assay 'Parameter1.'> 10 set bearing 'binary' to port, else to starboard Arrgh! Sail 'binary'
Port 'Trinidad' Starboard 'Sydney' Arrgh! //---------------------------- 'Trinidad' Cove

About

Piratical Programming Language - specification (humour)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published