Show HN: Wave – A C-like low-level language (now with %, [], and and= operators)

4 months ago 4

Discord Email


Warning:
The official version of this project has not yet been released. The first version will be distributed as v0.0.1.

CodeRabbit Pull Request Reviews

Latest version

Code size Downloads GitHub Workflow Status


Wave is a next-generation programming language designed for developing operating systems, system software, and applications—entirely using Wave.
We're building a Wave compiler with full hardware access.


Wave is an open-source programming language built with love, care, and a long-term vision. It’s a project that aims to push the boundaries of what low-level languages can be — without sacrificing clarity or safety.

If you believe in that vision, even a small gesture of support can make a big difference. Wave is developed by an independent creator with no corporate backing, and your sponsorship helps keep it alive and evolving.

Sponsor LunaStev


fun fibonacci(n: i32) -> i32 { if (n == 0) { return 0; } if (n == 1) { return 1; } var prev :i32 = 0; var curr :i32 = 1; var next :i32; var i :i32 = 2; while (i <= n) { next = prev + curr; prev = curr; curr = next; i = i + 1; } return curr; } fun main() { var i :i32 = 0; var result :i32; while (i <= 10) { result = fibonacci(i); println("fibonacci({}) = {}", i, result); i = i + 1; } println("END FIBONACCI"); }
fun main() { var a: i32 = 10; var b: i32 = 20; var p1: ptr<i32> = &a; var p2: ptr<i32> = &b; println("Before:"); println("a = {}, b = {}", a, b); println("p1 = {}, p2 = {}", deref p1, deref p2); var temp: i32 = deref p1; deref p1 = deref p2; deref p2 = temp; println("After:"); println("a = {}, b = {}", a, b); println("p1 = {}, p2 = {}", deref p1, deref p2); }

More examples are available inside test/.


Wave Concept Diagram


A huge thank you to our sponsors for supporting this project!

heymanbug
heymanbug


Interested in contributing? Check out our Contributing Guide to get started.


Star History Chart


Wave is released under the MPL-2.0 License.

Read Entire Article