Skip to content

Forge-Theory-Labs/metalanguageforge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– MetaLanguageForge Simulator

Design. Evolve. Compare. The ultimate programming language sandbox.

!License: MIT !Version !Tech

MetaLanguageForge is a browser-based interactive simulator for exploring the art and science of programming language design. It allows you to experiment with paradigms, constraints, and features, visualizing how these choices create trade-offs in performance, safety, and usability. The app is styled with a retro neon arcade aesthetic and is fully mobile-responsive.


๐Ÿ›๏ธ The Philosophy

Every programming language is a universe of trade-offs. A feature that boosts performance might sacrifice safety. A paradigm that enhances readability might reduce raw speed. MetaLanguageForge makes these abstract concepts tangible.

It's built on a simple idea: Language design is an evolutionary process. By allowing you to "forge" and "evolve" languages, the simulator reveals the hidden pressures and constraints that have shaped the tools we use to build software every day. It's a playground for asking "what if?"


โœจ Features

๐Ÿ› ๏ธ Core Simulator

  • Paradigm Selection: Choose from 5 fundamental paradigms: Object-Oriented, Functional, Imperative, Logical, and Reactive.
  • Constraint Toggles: Mix and match 8 design goals: High Performance, Memory Safety, Concurrency, Readability, Expressiveness, Security, Scalability, and Easy Learning.
  • Real-Time Score Preview: Instantly see how your choices impact Performance and Safety scores with a dynamic, glowing radar chart.
  • Instant Language Generation: Click "Simulate" to generate a detailed language specification based on your inputs.

๐Ÿ“œ Generated Specification

  • Detailed Spec: Each language comes with a generated Type System, Concurrency Model, Memory Model, and a list of Key Features.
  • Code Example: See a "Hello, World!" or a simple function written in the syntax of your newly created language.
  • Unique Name & Version: Every language gets a procedurally generated name (e.g., "AetherScript 1.0") for flavor.

๐Ÿงฌ Evolution & Comparison

  • Evolution Simulation: Simulate 5 generations of language evolution, showing how scores and features can shift over time under consistent design pressures.
  • Visual Timeline: View the evolution results in a mobile-friendly, scrollable timeline chart, tracking Performance and Safety scores across generations.
  • Compare Languages: Place any two generated languages in a side-by-side comparison view, automatically highlighting their unique and shared features.

๐Ÿ’พ Export & Share

  • Save as Text: Download a clean, human-readable .txt file of your language spec.
  • Export as JSON: Download a structured .json file of a single language or the full evolution timeline for machine-readable analysis.
  • Copy to Clipboard: Quickly copy the entire spec to share it anywhere.

๐ŸŽฎ UI/UX

  • Retro Neon Aesthetics: A fun, engaging interface inspired by 80s arcade games, with glowing text and a dark theme.
  • Fully Responsive: Designed to work seamlessly on desktops, tablets, and mobile phones.
  • Mobile Touch Optimized: Features large tap targets, scrollable modals, and a layout that adapts to small screens.
  • Keyboard Accessible: Navigate and interact with all controls using a keyboard.

๐Ÿš€ Quick Start

No installation or setup required!

  1. Open index.html in your browser.
  2. That's it! The simulator is ready to go.

Basic Workflow

  1. ๐Ÿงช Experiment with Inputs:

    • Click a Paradigm button (e.g., Functional).
    • Toggle the Constraint switches (e.g., enable Memory Safety and Concurrency).
    • Watch the Score Preview radar chart change in real-time.
  2. ๐Ÿค– Generate Your Language:

    • Click the big "Simulate Language Design" button.
    • A modal will appear with your complete language specification.
  3. ๐Ÿ’พ Save or Share:

    • Use the buttons at the bottom of the modal to Download as Text, Export as JSON, or Copy to Clipboard.
  4. ๐Ÿงฌ Evolve It:

    • Close the modal and click "Simulate Language Evolution".
    • See how a language might change over 5 generations to better meet your chosen constraints.
  5. โš–๏ธ Compare Two Designs:

    • Generate two different languages.
    • Click "Compare Languages" and select them from the dropdowns to see a detailed comparison.

๐Ÿ“ File Structure

The project is intentionally simple and self-contained.

โ””โ”€โ”€ ๐Ÿ“‚ metalanguageforge/
    โ””โ”€โ”€ ๐Ÿ“„ index.html  (All HTML, CSS, and JavaScript in one file)
  • No Dependencies: Relies only on vanilla JavaScript and a single Google Font (Orbitron) for the retro style.
  • No Build Step: Open the file and it works. Edit the code and refresh to see changes.

๐Ÿ”ง Customization

Since all the logic is in index.html, customization is straightforward.

  • Modify Paradigms/Constraints: Edit the paradigms and constraints objects in the <script> section to change their names or scoring impact.
  • Adjust Scoring Logic: The calculateScores and generateLanguageSpec functions contain the core logic for how features are selected and scores are determined.
  • Change Styles: All CSS is in the <style> section. Tweak colors, fonts, and animations to your liking.

๐ŸŽฏ Use Cases

๐ŸŽ“ Educational Tool

  • Visually teach students the trade-offs in programming language design.
  • Demonstrate how paradigms like Functional and OOP influence language features.
  • Provide a fun, interactive tool for computer science courses.

๐Ÿ’ก For Hobbyists & Designers

  • Brainstorm ideas for your own programming language.
  • Quickly prototype different feature combinations.
  • Explore the relationship between high-level design goals and concrete language features.

๐Ÿค” For Developers

  • Gain a deeper appreciation for why your favorite language is designed the way it is.
  • Understand the inherent challenges of creating a language that is simultaneously fast, safe, and easy to use.

๐Ÿ“œ License

This project is licensed under the MIT License. See the LICENSE file for details. It is free for personal, educational, and commercial use.


๐Ÿ™ Credits & Acknowledgments

  • Inspiration: The neon arcade style is heavily inspired by 80s retro games and synthwave aesthetics.
  • Font: Uses the Orbitron font from Google Fonts to achieve the retro-futuristic look.
  • Philosophy: Part of a broader collection of "Forge" simulators that explore emergent systems through simple rules.

๐Ÿ’ฌ Contact & Contributing

This is a personal project, but feedback and contributions are always welcome!

  • Found a bug? Open an issue.
  • Have an idea? Open an issue and tag it as an enhancement.
  • Want to contribute? Fork the repository and submit a pull request.

๐Ÿค– MetaLanguageForge - Forge Your Reality ๐Ÿค–

About

MetaLanguageForge is a browser-based interactive simulator for exploring the art and science of programming language design. It allows you to experiment with paradigms, constraints, and features, visualizing how these choices create trade-offs in performance, safety, and usability.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages