>[!DANGER] Abandoned and [[#Non-Functional|incomplete]].
Luna is an [[MIT License]] licensed [[Programming Languages|Programming Language]] written in [[C]].
- [Source](https://github.com/tj/luna)
> Luna is an expressive, minimalistic, elegant programming language implemented in C. With cooperative thread concurrency at its core, async I/O, and influences derived from languages such as Lua, io, Rust, Ruby, and C.
\- official readme
# Notability
Had some nice ideas for syntax and was building a very tight little VM before it was abandoned.
# Philosophy
## Creator
TJ Holowaychuk started[^1] a language called `Luna` in mid-[[2011]], implemented in [[C]].
> Luna’s syntax is inspired by Python, IO, and Lua, bits of Ruby, and of course, JavaScript.
In his initial blog post[^1] he goes into the design of the [[Virtual Machine]] and his use of registers over a stack.
## Non-Functional
> Luna doesn't run any code yet, it only parses the code and builds an AST.
Sometimes things just don't go the way you think. Just don't think you can run any code with it.
# Platform Support
- Linux[^2]
- Windows[^3]
# Features
In practice it has no features because it doesn't run any code. But it parses an AST and was intended to support a variety of interesting syntax and semantics:
- [[Gradual Typing]] via [[Type Inference]]
- [[Multiple Dispatch]] via function overloading
- dot-syntax which allows `func(foo, bar)` to be written as `foo.func(bar)` instead
- first-class support for coroutines via the `&` (fork, similar to [[Unix Shell]]) and `join` operations
# Related
There are a variety of programming languages and development environments which have similar names. To my knowledge, none of them are actually related.
There is a [[JVM]] implementation of [[Lua]] called `Luna`, as well as a [[Game Engine]] for [[Lua]] with the same name. Both apparently abandoned.
The [[Super Mario Bros]] fangame Super Mario Bros X uses a [[Lua]] variant for scripting that it calls `LunaLua`.[^4]
## No Connection to Luna Studio
`tj`'s Luna was at one time hosted at `github.com/luna/luna`.
At another point in time [[Enso]], formerly known as `Luna Studio`, was also hosted at that same GitHub URL. It also had the URL `luna-lang.org`, which still redirects to the remains of the [[Enso]] website as of [[2026-03-28]].
They have nothing in common beside their name.
# References
[^1]: https://web.archive.org/web/20130820081237/http://tjholowaychuk.com/post/7517832396/the-luna-programming-language
[^2]: https://github.com/tj/luna/commit/4ff846a10197d350a5e07af71ba556eda520f9d6
[^3]: https://github.com/tj/luna/commit/168ec10c6f666e0472168f32122313a6d06c45de
[^4]: https://wohlsoft.ru/pgewiki/How_To:_LunaLua_basics