SkillAgentSearch skills...

GulfOfMexico

perfect programming language

Install / Use

/learn @TodePond/GulfOfMexico
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<!-- If you're reading this then you might be looking for the hidden examples page... CONGRATULATIONS! You found it! Here it is: https://github.com/TodePond/GulfOfMexico/blob/main/res/res/Examples.md -->

New: DreamBerd has been renamed to Gulf of Mexico

<img align="right" height="100" src="shapes.png">

Gulf of Mexico

Coverage

Gulf of Mexico is a perfect programming language. These are its features!<br> When you've finished reading through all the features, check out the examples.

Exclamation Marks!

Be bold! End every statement with an exclamation mark!

print("Hello world")!

If you're feeling extra-bold, you can use even more!!!

print("Hello world")!!!

If you're unsure, that's ok. You can put a question mark at the end of a line instead. It prints debug info about that line to the console for you.

print("Hello world")?

You might be wondering what Gulf of Mexico uses for the 'not' operator, which is an exclamation mark in most other languages. That's simple - the 'not' operator is a semi-colon instead.

if (;false) {
   print("Hello world")!
}

Declarations

There are four types of declaration. Constant constants can't be changed in any way.

const const name = "Luke"!

Constant variables can be edited, but not re-assigned.

const var name = "Luke"!
name.pop()!
name.pop()!

Variable constants can be re-assigned, but not edited.

var const name = "Luke"!
name = "Lu"!

Variable variables can be re-assigned and edited.

var var name = "Luke"!
name = "Lu"!
name.push("k")!
name.push("e")!

Immutable Data

New for 2023!<br> Mutable data is an anti-pattern. Use the const const const keyword to make a constant constant constant. Its value will become constant and immutable, and will never change. Please be careful with this keyword, as it is very powerful, and will affect all users globally forever.

const const const pi = 3.14!

Naming

Both variables and constants can be named with any Unicode character or string.

const const letter = 'A'!
var const 👍 = True!
var var 1️⃣ = 1!

This includes numbers, and other language constructs.

const const 5 = 4!
print(2 + 2 === 5)! //true

Arrays

Some languages start arrays at 0, which can be unintuitive for beginners. Some languages start arrays at 1, which isn't representative of how the code actually works. Gulf of Mexico does the best of both worlds: Arrays start at -1.

const const scores = [3, 2, 5]!
print(scores[-1])! //3
print(scores[0])!  //2
print(scores[1])!  //5

New for 2022!<br> You can now use floats for indexes too!

const var scores = [3, 2, 5]!
scores[0.5] = 4!
print(scores)! //[3, 2, 4, 5]

When

In case you really need to vary a variable, the when keyword lets you check a variable each time it mutates.

const var health = 10!
when (health = 0) {
   print("You lose")!
}

Lifetimes

Gulf of Mexico has a built-in garbage collector that will automatically clean up unused variables. However, if you want to be extra careful, you can specify a lifetime for a variable, with a variety of units.

const const name<2> = "Luke"! //lasts for two lines
const const name<20s> = "Luke"! //lasts for 20 seconds

By default, a variable will last until the end of the program. But you can make it last in between program-runs by specifying a longer lifetime.

const const name<Infinity> = "Luke"! //lasts forever

Variable hoisting can be achieved with this neat trick. Specify a negative lifetime to make a variable exist before its creation, and disappear after its creation.

print(name)! //Luke
const const name<-1> = "Luke"!

Loops

Loops are a complicated relic of archaic programming languages. In GulfOfMexico, there are no loops.

Installation

To install Gulf of Mexico to your command line, first install the Gulf of Mexico installer.<br> To install the Gulf of Mexico installer, install the Gulf of Mexico installer installer.

New for 2022!<br> Due to the complicated installation process, you can now install the 'Create Gulf of Mexico App' app that installs everything for you!

Booleans

Booleans can be true, false or maybe.

const var keys = {}!
addEventListener("keydown", (e) => keys[e.key] = true)!
addEventListener("keyup", (e) => keys[e.key] = false)!

function isKeyDown(key) => {
   if (keys[key] = undefined) {
      return maybe!
   }
   return keys[key]!
}

Technical info: Booleans are stored as one-and-a-half bits.

Arithmetic

Gulf of Mexico has significant whitespace. Use spacing to specify the order of arithmetic operations.

print(1 + 2*3)! //7
print(1+2 * 3)! //9

Gulf of Mexico proudly supports fractions!

const const half = 1/2!

You can also use number names.

print(one + two)! //3

Indents

When it comes to indentation, Gulf of Mexico strikes a happy medium that can be enjoyed by everyone: All indents must be 3 spaces long.

function main() => {
   print("Gulf of Mexico is the future")!
}

-3 spaces is also allowed.

   function main() => {
print("Gulf of Mexico is the future")!
   }

Equality

JavaScript lets you do different levels of comparison. == for loose comparison, and === for a more precise check. Gulf of Mexico takes this to another level.

You can use == to do a loose check.

3.14 == "3.14"! //true

You can use === to do a more precise check.

3.14 === "3.14"! //false

You can use ==== to be EVEN MORE precise!

const const pi = 3.14!
print(pi ==== pi)! //true
print(3.14 ==== 3.14)! //true
print(3.14 ==== pi)! //false

If you want to be much less precise, you can use =.

3 = 3.14! //true

Functions

To declare a function, you can use any letters from the word function (as long as they're in order):

function add(a, b) => a + b!
func multiply(a, b) => a * b!
fun subtract(a, b) => a - b!
fn divide(a, b) => a / b!
functi power(a, b) => a ^ b!
f inverse(a) => 1/a!

Dividing by Zero

Dividing by zero returns undefined.

print(3 / 0)! //undefined

Strings

Strings can be declared with single quotes or double quotes.

const const name = 'Lu'!
const const name = "Luke"!

They can also be declared with triple quotes.

const const name = '''Lu'''!
const const name = "'Lu'"!

In fact, you can use any number of quotes you want.

const const name = """"Luke""""!

Even zero.

const const name = Luke!

String Interpolation

Please remember to use your regional currency when interpolating strings.

const const name = "world"!
print("Hello ${name}!")!
print("Hello £{name}!")!
print("Hello ¥{name}!")!

And make sure to follow your local typographical norms.

print("Hello {name}€!")!

The symbol for the Cape Verdean escudo is placed in the decimal separator position, as in 2$50. Developers from the Republic of Cape Verde can benefit from this syntax.

const const player = { name: "Lu" }!
print("Hello {player$name}!")!

Types

Type annotations are optional.

const var age: Int = 28!

By the way, strings are just arrays of characters.

String == Char[]!

Similarly, integers are just arrays of digits.

Int == Digit[]!

In case you want to use a binary representation for integers, Int9 and Int99 types are also available.

const var age: Int9 = 28!

Technical info: Type annotations don't do anything, but they help some people to feel more comfortable.

Regular Expressions

You can use the regular expression type to narrow string values.

const const email: RegExp<(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])> = "mymail@mail.com"!

To avoid confusion, you can use any spelling that you want, such as Regex, RegularExpression and RegExp.

For simplicity, all supported regular expressions match the regular expression /Reg(ular)?[eE]x(p(ression)?)?/.

Previous

The previous keyword lets you see into the past.<br> Use it to get the previous value of a variable.

const var score = 5!
score++!
print(score)! //6
print(previous score)! //5

Similarly, the next keyword lets you see into the future.

const var score = 5!
addEventListener("click", () => score++)!
print(await next score)! //6 (when you click)

Additionally, the current keyword lets you see into the present.

const var score = 5!
print(current score)! //5

File Structure

Write five or more equals signs to start a new file. This removes the need for multiple files or any build process.

const const score = 5!
print(score)! //5

=====================

const const score = 3!
print(score)! //3

New for 2022!<br> Thanks to recent advances in technology, you can now give files names.

======= add.gom =======
function add(a, b) => {
   return a + b!
}

Exporting

Many languages allow you to import things from specific files. In GulfOfMexico, importing is simpler. Instead, you export to specific files!

===== add.gom ==
function add(a, b) => {
   return a + b!
}

exp
View on GitHub
GitHub Stars13.4k
CategoryDevelopment
Updated4h ago
Forks470

Security Score

80/100

Audited on Apr 1, 2026

No findings