Pangea JS Documentation

Pangea is a toy language project built for learning, experimentation, and language design. It combines a text-based runtime with ongoing attempts to make program structure more graphical and easier to inspect.

Toy language Single author Experimental UI

Project Story

The original plan was a DHTML-based graphical interface. That goal led to a series of translations and rewrites:

LuaPang -> first implementation direction.

TypescriptPang -> translation and expansion for browser-oriented work.

TypescriptStructure -> rewrite focused on list-of-lists structures for intermediate programs.

The most ambitious part, a full program-tree graphical interface with two-way transformation between text and graphics, is still open. It requires more design novelty than has felt practical or fun so far.

Core Intent

  • Build a language that is interesting to explore.
  • Use execution structure as a learning aid.
  • Experiment with graphical editing without giving up source code.

What Exists Today

  • Browser-based editor and runtime in main.html and main.js.
  • Interactive execution with live visual parse hints.
  • Examples such as factorial and fizz-buzz.

Open Challenges

  • Stable two-way mapping between source text and graphical program trees.
  • Usable intermediate structure representation during execution.
  • Keeping the project readable and enjoyable while still exploring unusual ideas.

Execution Model (High Level)

Programs are tokenized and evaluated with a phrase-length strategy that supports prefix forms, infix operators, and block-style constructs. The current editor also experiments with visual hints that show how infix chains are grouped.

Example

print "111" + 1 + 2 + 5

In the current interface, this can be displayed as a left-to-right chain with progressive grouping hints.

Repository Layout

Roadmap Ideas