Experimental interpreter based on Lu Wilson's (TodePond) Gulf of Mexico conceptual design - featuring probabilistic variables, negative indexing, and temporal lifetimes
Project description
GOM - Gulf of Mexico Programming Language
The perfect programming language - Based on the conceptual design by Lu Wilson (TodePond) (original repo)
๐ Quick Links
- Complete Documentation - Full documentation index
- Whatโs New - Latest changes
- Installation Guide - Setup instructions
- User Guide - Complete user documentation
- Programming Guide - Language features
- Language Construction Set - Create custom language variants
Note (Nov 2025): Internal GOM test programs used for designing/debugging the language were removed. Use user-facing examples in
programs/examples/, demos inprograms/demos/, compiler examples incompiler/examples/, and Python unit tests intests/.
๐ Two Implementations
Python Interpreter โญ (Recommended)
- Full-featured REPL with graphical IDE
- Complete language support with all features
- Language Construction Set - Create custom language variants
- Plugin system for extensibility
- Rich debugging and interactive development
- Production-ready and fully tested
C++ Compiler โ ๏ธ (Experimental)
- Research project - not production-ready
- Compiles to C++ and native executables
- Subset of features (no satirical keywords, limited functions)
- Does NOT support Language Construction Set customization
- Use Python interpreter for full features
- See
compiler/EXPERIMENTAL_STATUS.mdfor details
๐ฏ Installation
# Clone repository
git clone https://github.com/James-HoneyBadger/GulfOfMexico.git
cd GulfOfMexico
# Install Python interpreter
pip install -e .
# Optional: Build C++ compiler (experimental)
cd compiler/build
cmake ..
make -j4
For detailed installation instructions, see docs/guides/INSTALL_GUIDE.md.
โก Quick Start
Run Your First Program
# Create a file: hello.gom
echo 'print("Hello, Gulf of Mexico!")!' > hello.gom
# Run it
python -m gulfofmexico hello.gom
Interactive REPL
# Start REPL
python -m gulfofmexico
# Or use the graphical IDE
python -m gulfofmexico.ide
Try Examples
# Run example programs
python -m gulfofmexico programs/examples/01_hello_world.gom
python -m gulfofmexico programs/examples/02_variables.gom
# Run feature demonstrations
python -m gulfofmexico programs/demos/feature_showcase.gom
๐จ Language Construction Set โจ NEW!
Create your own programming language by customizing Gulf of Mexico!
What Can You Customize?
- โ
Keywords - Rename any keyword (
ifโsi,functionโdefun) - โ Functions - Add, remove, or rename built-in functions
- โ Syntax - Array indexing, comments, delimiters
- โ Parsing - Block syntax, separators, operators
- โ Features - Enable/disable satirical keywords, quantum features
Quick Examples
# Use Python-like syntax
python -m gulfofmexico --preset python_like myprogram.gom
# Spanish keywords
python -m gulfofmexico --preset spanish programa.gom
# Minimal teaching mode
python -m gulfofmexico --preset minimal script.gom
# Load custom configuration
python -m gulfofmexico --config my_language.json script.gom
Create Language Variants
# See what's possible
python demo_create_new_languages.py
# This creates:
# - GulfLisp (Lisp-like)
# - GulfTurtle (Logo/Turtle graphics)
# - GulfQL (SQL-like)
# - GulfASM (Assembly-like)
# Plus demonstrates CRUD operations!
CLI Configuration Tool
# Create from preset
python gomconfig.py create --preset python_like --output my_lang.json
# Interactive creation
python gomconfig.py create --interactive
# Update configuration
python gomconfig.py update my_lang.json --set metadata.author "Your Name"
# Delete elements
python gomconfig.py delete my_lang.json --keyword synergize --function blockchain
# Merge configurations
python gomconfig.py update config1.json --merge config2.json
# Compare configurations
python gomconfig.py diff config1.json config2.json
# Validate
python gomconfig.py validate my_lang.json
# Show info
python gomconfig.py info my_lang.json
Available Presets
- python_like - Python-style (
def, 0-based arrays,#comments) - js_like - JavaScript-style (semicolons, 0-based)
- serious - No satirical features
- minimal - Teaching mode (6 keywords, 5 functions)
- spanish - Spanish keywords
- french - French keywords
Documentation
- Quick Start - 5-minute introduction
- Complete Guide - Full documentation
- Enhanced Features - Advanced capabilities
- Quick Reference - Cheat sheet
See examples in examples/configs/ - includes Lisp, SQL, Logo, and Assembly variants!
๐ Core Language Features
Arrays Start at -1
var items = ["first", "second", "third"]
print(items[-1])! // Prints "first"
print(items[0])! // Prints "second"
print(items[1])! // Prints "third"
Flexible String Syntax
var message = "Hello World"! // Double quotes
var name = 'Alice'! // Single quotes
var multiline = """
This is a
multi-line string
"""! // Triple quotes
Three-Valued Logic
var answer = maybe! // true, false, or maybe
Functions
function greet(name) {
print("Hello, " + name)!
return "Greetings sent"!
}
var result = greet("World")!
Satirical Keywords
// Procrastination scheduling
later {
print("I'll do this eventually")!
}
// Corporate synergy
synergize data with analytics!
// Quantum computing
quantum_compute {
// Exists in multiple states simultaneously
}
More Features
- Classes and Objects - OOP support
- Async/Await - Asynchronous programming
- Pattern Matching - Advanced control flow
- Time Travel - Temporal variable lifetimes
- Graphics - Built-in turtle graphics and image manipulation
- Plugin System - Extend the language
See docs/guides/PROGRAMMING_GUIDE.md for complete language documentation.
๐ Documentation
Essential Reading
- DOCUMENTATION.md - Complete documentation index
- User Guide - How to use Gulf of Mexico
- Programming Guide - Language features
Language Customization
- Quick Start - Get started in 5 minutes
- Complete Guide - Everything about customization
Reference
- Built-in Functions - Complete function reference
- Technical Reference - Architecture and internals
- Benchmarks - Performance comparisons
Compiler
- โ ๏ธ Experimental Status - Important limitations
- Compiler README - C++ compiler overview
๐ง Advanced Usage
Debugging
# Show internal debug messages
python -m gulfofmexico --debug script.gom
# Show completion messages
python -m gulfofmexico --verbose script.gom
# Launch IDE with debug output
python -m gulfofmexico.ide --debug
# Or use environment variables
GULFOFMEXICO_DEBUG=1 python -m gulfofmexico script.gom
REPL Commands
:load programs/examples/01_hello_world.gom # Load and run a file
:vars # Show all variables
:history 10 # Show last 10 commands
:run 5 # Re-run command #5
:reset # Clear all state
:quit # Exit REPL
Custom Configuration
from gulfofmexico.language_config import LanguageConfig
# Create custom language
config = LanguageConfig(name="MyLanguage")
# Customize keywords
config.rename_keyword("if", "cuando")
config.rename_keyword("function", "funciรณn")
# Customize functions
config.rename_function("print", "imprimir")
# Disable satirical features
config.disable_satirical_keywords()
# Save
config.save("my_language.json")
# Use it
# python -m gulfofmexico --config my_language.json script.gom
๐ Project Structure
GulfOfMexico/
โโโ gulfofmexico/ # Python interpreter (main implementation)
โ โโโ language_config.py # Language Construction Set
โ โโโ language_runtime.py # Runtime integration
โ โโโ interpreter.py # Main interpreter
โ โโโ builtin.py # Built-in functions
โ โโโ ...
โ
โโโ compiler/ # C++ compiler (experimental)
โ โโโ EXPERIMENTAL_STATUS.md # โ ๏ธ Read this first!
โ โโโ ...
โ
โโโ docs/ # All documentation
โ โโโ guides/ # User guides
โ โโโ language/ # Language Construction Set docs
โ โโโ reference/ # Technical reference
โ โโโ compiler/ # Compiler documentation
โ
โโโ programs/ # Example programs (user-facing)
โ โโโ examples/ # Learning examples
โ โโโ demos/ # Feature demonstrations
โ
โโโ examples/configs/ # Demo language configurations
โ โโโ demo_gulplisp.json # Lisp-like language
โ โโโ demo_gulfturtle.json # Turtle graphics
โ โโโ demo_gulfql.json # SQL-like language
โ โโโ demo_gulfasm.json # Assembly-like
โ
โโโ configs/ # Language presets
โ โโโ python_like.yaml # Python-style
โ โโโ minimal.json # Teaching mode
โ โโโ README.md
โ
โโโ gomconfig.py # CLI configuration tool
โโโ demo_create_new_languages.py # Advanced demos
โโโ README.md # This file
๐ Examples
Hello World
print("Hello, World")!
Variables and Arrays
var name = "Alice"!
var numbers = [10, 20, 30]!
var first = numbers[-1]! // -1 indexing!
Functions
function factorial(n) {
if n < 2 {
return 1!
}
return n * factorial(n - 1)!
}
print(factorial(5))! // 120
Classes
class Person {
function __init__(name, age) {
this.name = name!
this.age = age!
}
function greet() {
print("Hello, I'm " + this.name)!
}
}
var alice = Person("Alice", 30)!
alice.greet()!
Async/Await
async function fetchData(url) {
var result = await http.get(url)!
return result!
}
var data = await fetchData("https://api.example.com/data")!
See programs/examples/ for 50+ example programs!
๐ฆ Language Construction Set Examples
Create a Lisp-Like Language
from gulfofmexico.language_config import LanguageConfig, ParsingConfig
config = LanguageConfig(name="GulfLisp")
# Lisp-style syntax
config.parsing_config = ParsingConfig(
block_start="(",
block_end=")",
list_start="(",
list_end=")",
)
# Lisp keywords
config.rename_keyword("function", "defun")
config.rename_keyword("var", "let")
config.save("gulplisp.json")
Create a Teaching Language
config = LanguageConfig(name="TeachingGOM")
# Keep only essentials
config.disable_satirical_keywords()
config.update({"syntax_options": {"array_start_index": 0}}, merge=True)
# Remove advanced features
config.delete_keyword("quantum_compute")
config.delete_keyword("time_travel")
config.save("teaching.json")
Run the comprehensive demo:
python demo_create_new_languages.py
This creates 5 complete language variants:
- GulfLisp - Lisp-like with parentheses
- GulfTurtle - Logo/Turtle graphics
- GulfQL - SQL-like query language
- GulfASM - Minimal assembly-like
- Plus CRUD operations demonstration!
โ ๏ธ Important: Interpreter vs Compiler
| Feature | Python Interpreter | C++ Compiler |
|---|---|---|
| Status | โ Production-ready | โ ๏ธ Experimental |
| Language Construction Set | โ Full support | โ Not supported |
| All Features | โ Complete | โ Subset only |
| Satirical Keywords | โ Yes | โ No |
| Plugin System | โ Yes | โ No |
| Customization | โ Full | โ None |
| Use For | Development, production | Research, experiments |
Recommendation: Use the Python interpreter for all development and production use.
See compiler/EXPERIMENTAL_STATUS.md for detailed comparison.
๐ค Contributing
Contributions are welcome! Please:
- Read
CODE_OF_CONDUCT.md - Check
docs/reference/TECHNICAL_REFERENCE.md - Submit pull requests with tests
- Follow the existing code style
๐ Statistics
- Programming Language: Gulf of Mexico
- Implementations: Python interpreter (stable) + C++ compiler (experimental)
- Language Construction Set: 5 comprehensive docs, CLI tool, working demos
- Example Programs: 50+ programs in
programs/ - Demo Configurations: 11+ language variants in
examples/configs/ - Documentation: 25+ organized documents in
docs/ - Built-in Functions: 35+ functions (interpreter)
- Presets: 6 language presets ready to use
๐ฏ Use Cases
- Learning: Great for teaching programming concepts
- Prototyping: Quick experimentation with satirical features
- Language Design: Create custom language variants
- DSL Creation: Build domain-specific languages
- Research: Experiment with novel language features
๐ License
MIT License - See LICENSE for details
๐ Credits
- Original Concept: Lu Wilson (TodePond) - https://github.com/TodePond/GulfOfMexico
- Implementation: James-HoneyBadger
- Language Construction Set: Advanced customization system
๐ Links
- GitHub: https://github.com/James-HoneyBadger/GulfOfMexico
- Documentation: DOCUMENTATION.md
- Original Concept: https://github.com/TodePond/GulfOfMexico
Get Started: python -m gulfofmexico
Customize: python demo_create_new_languages.py
Learn More: DOCUMENTATION.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gulfofmexico-0.1.4.tar.gz.
File metadata
- Download URL: gulfofmexico-0.1.4.tar.gz
- Upload date:
- Size: 130.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
160be6afda1e9cd47c18eafcbd00c10279553de5212372ab35eae23daf2d3531
|
|
| MD5 |
6a49021fc58dbc22e951f1c562ab42f2
|
|
| BLAKE2b-256 |
ab0828ab417f2a85ed098b43dc7aaea90dcd16772158a7dbe7466c6f0e87ed5b
|
File details
Details for the file gulfofmexico-0.1.4-py3-none-any.whl.
File metadata
- Download URL: gulfofmexico-0.1.4-py3-none-any.whl
- Upload date:
- Size: 147.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef4fd8a5ab2de44daa16b9eb7c5869ec7107179d1ef002b7a814e41e5d9c8238
|
|
| MD5 |
8336b8e96a1095015c9477b3378ffc47
|
|
| BLAKE2b-256 |
aad14695d28b56faacb9b82755374211aab4019f4f1782e592f24510309232f6
|