GALA Playground – Try GALA in Your Browser

The GALA Playground lets you write, compile, and run GALA code directly in your browser. No installation, no setup – just open it and start coding.

Open Playground

The playground transpiles your GALA code to Go and runs it on the server. You get real compiler output, real error messages, and real program results. It is the same transpiler that runs locally when you install GALA.


What You Can Try

The playground comes with 9 built-in examples that demonstrate GALA’s core features. Select any example from the dropdown to load it instantly:

  1. Hello World – the simplest GALA program
  2. Structs and Pattern Matching – immutable structs with destructuring and guards
  3. Sealed Types – closed type hierarchies with exhaustive matching
  4. Option MonadSome/None with Map, FlatMap, GetOrElse
  5. Either TypeLeft/Right disjoint unions with monadic chaining
  6. Try Error Handling – failable computations with Map, FlatMap, Recover
  7. Functional CollectionsArray, List, HashMap with Map, Filter, FoldLeft
  8. String Interpolations"..." and f"..." string templates
  9. Tuples and Destructuring – pair and triple values with pattern matching

Quick Example

Paste this into the playground to see sealed types, pattern matching, and string interpolation working together:

package main

sealed type Animal {
    case Dog(Name string, Tricks int)
    case Cat(Name string, Indoor bool)
    case Fish(Species string)
}

func describe(a Animal) string = a match {
    case Dog(name, tricks) if tricks > 5 => s"$name is a talented dog with $tricks tricks"
    case Dog(name, _)                    => s"$name is a good dog"
    case Cat(name, true)                 => s"$name is an indoor cat"
    case Cat(name, false)                => s"$name is an outdoor cat"
    case Fish(species)                   => s"a $species fish"
}

func main() {
    val animals = SliceOf(
        Dog("Rex", 8),
        Cat("Whiskers", true),
        Fish("Goldfish"),
        Dog("Buddy", 3),
        Cat("Luna", false),
    )

    for _, a := range animals {
        Println(describe(a))
    }
}

Expected output:

Rex is a talented dog with 8 tricks
Whiskers is an indoor cat
a Goldfish fish
Buddy is a good dog
Luna is an outdoor cat

This example shows:


Ready to Install?

If you like what you see in the playground, install GALA locally for full project support, Bazel integration, and multi-file packages.

Get Started