Luma Update: What We’ve Achieved in Days – and What’s Cooking!

crowned.phoenixcrowned.phoenix
3 min read

We’re thrilled to share what’s been happening under the hood of Luma, a new language designed to bring clarity, structure, and power into the hands of developers who value expressive simplicity and type safety.

What We’ve Achieved This Week

Over the past few days, Luma has evolved rapidly thanks to focused effort, clarity in vision, and lots of iteration. Here’s a snapshot of what we’ve put in place:

Core Language Features

  • Typed Variables: Native types like int, float, bool, str, and the newly added byte.

  • Constants via lock keyword — simple and safe.

  • Collections: Support for [int], [byte], {str: int}, and {int} (set).

  • Range Expressions: Elegant syntax like 0..5 or 1..=10.

  • Control Flow: if, else, and expression-based blocks.

  • Loops with walk(): Functional-style iteration over lists and ranges.

Type Introspection

  • x.type() returns the type of any variable.

  • x.is_type("int") to check variable types at runtime.

Type Conversion (The Luma Way)

Luma includes smart and standardized conversions:

  • to_int(), to_float(), to_bool(), to_byte(), to_str()

  • Optional defaults like to_int(0) for safe fallback

  • Works seamlessly with literals, strings, and hex bytes (0x48)

Behind the Scenes: AST & Compiler

We’ve laid down a solid and transparent AST structure and a compiler pipeline:

  • AST is clean, Go-style, and intuitive

  • Parser recognizes chained expressions like value.to_str().is_type("str")

  • Compiles to idiomatic Go for easy integration and performance

Luma CLI

The command-line interface is ready and minimal:

luma run file.luma         # Run file
luma compile file.luma     # See Go output
luma build file.luma       # Build executable
luma tokens file.luma      # Debug tokens
luma repl                  # Interactive REPL

New command added: luma compile now shows the generated Go source code — transparency matters.

What’s Cooking Next?

We're already cooking up arithmetic operations with smart type coercion:

  • +, -, *, /, %, ++, --

  • Mixing int and float? No problem.

  • The result is automatically coerced to match the expected type:

x: float = 2 + 2.5   // result is 4.5
y: int = 3.7 + 1.2   // result is 4 (truncated)

And yes — no need for manual casting. Luma handles the logic for you behind the scenes.

Documentation

We now have growing documentation hosted at:

https://luma.hashnode.space

It includes:

  • Language syntax

  • Philosophy

  • CLI usage

  • Type system

  • Contribution guide

  • AST design and internals

Contribute!

Want to suggest core functions? Check the How to Contribute chapter. We're building a friendly, open space for contributions and ideas.

Why Luma?

If Go is fast, Python is friendly, and Rust is safe — Luma aims to be expressive, intuitive, and type-consistent, bridging the best of them while cutting out the noise.

Stay tuned, try it out, contribute, or just follow the journey.

We’re moving fast — but thoughtfully.

0
Subscribe to my newsletter

Read articles from crowned.phoenix directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

crowned.phoenix
crowned.phoenix