Introducing Gloat and Glojure
Hey there, I'm GLOAT -- the Greatest Linguist Of All Time.
(and the smuggest goat you'll ever meet!)
I speak Clojure, YAMLScript, Glojure, and Go fluently.
That makes me the mascot of Gloat, a Glojure AOT tool that turns Clojure and YAMLScript into Go code and much much more.
What is Gloat?¶
Gloat is the "Glojure AOT Tool"!
Gloat is an ahead-of-time (AOT) compilation tool with a multi-stage pipeline:
You hand it Clojure (.clj) or YAMLScript (.ys) source files, and it
walks through each stage -- converting to Glojure, then to Go, and finally
compiling to a standalone executable or many other output formats.
Every intermediate format can be output for inspection, so the process is fully
transparent.
Gloat can generate Glojure and Go code, native binaries and shared libraries for over 20 OS/Arch platforms. It also can generate WebAssembly modules for both the browser and server, turn YAMLScript into Babashka-ready Clojure files and produce complete Go code directories that are ready to build.
gloat hello.ys # Compile to ./hello native binary
gloat hello.ys -t clj # Generate Clojure code to stdout
gloat hello.ys -t bb # Generate Babashka-ready Clojure
gloat hello.ys -t glj # Generate Glojure code
gloat hello.ys -t go # Generate Go code
gloat hello.ys -o hi.js # Generate a Wasm module
gloat hello.ys -t lib # Compile to hello.so shared library
gloat hello.ys -o hi/ # Generate a Go build directory
gloat --help # See all the things you can do
man gloat # Read the gloat manpage
Gloat's objective is to make it incredibly easy to do almost anything you'd want to do with Glojure.
What is Glojure?¶
Glojure is a Go implementation of the Clojure programming language.
As you may know, Clojure is written in Java, compiles to Java bytecode and interoperates seamlessly with the Java ecosystem.
Glojure is written in Go and has Clojure style interop; but with the Go language and libraries, instead of Java's. Glojure has no relationship to Java at all, just like Clojure has none with Go. Fortunately the Go ecosystem is as rich and well supported as Java's.
Like Clojure's clj, the glj CLI supports interactive REPL usage, but it also supports
AOT compilation to Go source code.
Glojure opens up the wonderful world of Clojure to one of the most popular and thriving languages, Go.
Why Gloat?¶
Clojure is a super elegant, dynamic, functional programming language that works seamlessly with Java/JVM, JavaScript (ClojureScript), C++/LLVM (Jank) and now with Go (Glojure).
YAMLScript lets you write Clojure code in a new, modern and non-Lisp syntax that is also valid YAML. This makes it potentially more accessible and easier to integrate with YAML-based tools and workflows. YAMLScript transpiles to Clojure, so you can use it with any Clojure platform.
Glojure is a new Clojure platform/dialect for the Go ecosystem, and the Go ecosystem is a fantastic place to be!
Go is a leading language for systems programming, web services, and cloud infrastructure. It's fast, efficient, has great tooling, a huge standard library and a vibrant community.
Go compiles to standalone binaries, Wasm modules and shared libraries with no runtime dependencies. It cross-compiles easily to 20+ OS/Arch platforms, and has first-class support for FFI integration with C and other languages.
Gloat ties all of these together, making it dead simple to get to where you want to go with Clojure and YAMLScript.
Gloat is a CLI that has no dependencies (other than bash, curl, git and
make).
Thanks to the Makes self-installation
Makefile system, gloat installs every last tool that it needs, including,
Go, Glojure, YAMLScript, Babashka and many more.
Getting Started¶
Install Gloat with a single command:
Then compile your first program:
Check out the Getting Started guide for full installation instructions, or try the interactive demo right in your browser.
Holy Graal!¶
GraalVM's native-image compiler has been used by Clojure programmers for years
to compile Clojure to native binaries, and shared libraries.
It turns Java bytecode into native code, and it works with Clojure because
Clojure compiles to Java bytecode.
The binaries are pretty fast, but their compilation times are so slooow! They are also very large, even for the smallest Clojure programs. They work on Linux, macOS and Windows, but nowhere else, and cross-compilation is not supported at all.
Gloat and Glojure promise to change all of that! The Gloat fork of Glojure already compiles to 20+ OS/Arch platforms, and the compilation times are measured in seconds, not minutes. It also cross-compiles to all those platforms, simply because Go does.
Currently the binaries are even larger and slower than GraalVM's, but Gloat and Glojure are just getting started, and there are endless optimization possibilities.
What's Next¶
The Gloat project started exactly 3 weeks ago on February 1st, 2026, and it's already in a very usable state.
Of course, there's always more to do.
I have a few big things I want to add soon, but I'm really hoping that most of Gloat's future direction comes from you!
You can find me online in the Clojurians Slack #gloat channel or on the Gloat GitHub Repo issues and discussions.
I'll also be posting regular updates here on the Gloat blog, so stay tuned for more exciting news and deep dives into the inner workings of Gloat and Glojure.
Time to Gloat!