Skip to content Skip to footer

Rhombus Language by swatson741

6 Comments

  • Post Author
    rednafi
    Posted March 18, 2025 at 3:17 am

    The syntax looks clean, akin to Python, but with terser record types. This would make a nice config or an embedded language like Lua.

    One thing I’d appreciate here is a “Why Rhombus?” page, even if the rationale is simply that it’s fun.

    Edit: Turns out there’s a goals[1] page. Rhombus is trying to replace Lisp’s parenthesis-heavy syntax with something cleaner while keeping Racket’s powerful macro support.

    [1]: https://rhombus-lang.org/goal.html

  • Post Author
    lygaret
    Posted March 18, 2025 at 3:25 am

    This is racket's [rhombus], which might be an interesting second link here; it's a scheme, underneath, with the full power of Racket libs available.

    [`shrubbery`], the replacement for s-exprs, is pretty interesting, expanding s-expr simply with grouping, and then a separate infix-pass on top. I've been playing with using it as the basis for a separate language; it's in an interesting place in the AST space, especially given the forethought put into macros.

    [rhombus]: https://docs.racket-lang.org/rhombus/index.html

    [shrubbery]: https://docs.racket-lang.org/shrubbery/index.html

  • Post Author
    wavemode
    Posted March 18, 2025 at 3:45 am

    From the 2nd example:

    class Rect(left, top, right, bottom)

    fun rect_like_to_rect(v):
    match v
    | Rect(_, _, _, _): v
    | {"LT": [l, t], "RB": [r, b]}: Rect(l, t, r, b)
    | {"TL": [t, l], "RB": [b, r]}: Rect(l, t, r, b)

    rect_like_to_rect({"TL": [0, 2], "RB": [10, 5]})
    // ⇒ Rect(0, 2, 10, 5)

    Isn't this wrong? I'd expect to see Rect(2, 0, 5, 10) instead.

    It also seems like "RB" was meant to be "BR".

  • Post Author
    coolio1232
    Posted March 18, 2025 at 4:31 am

    This actually looks good. It's like a less-obtuse Haskell. At a glance the features seem to be just the right mix of functional programming paradigms and standard imperative programming.

  • Post Author
    fithisux
    Posted March 18, 2025 at 5:37 am

    Is this a reincarnation of Pyret?

  • Post Author
    pmontra
    Posted March 18, 2025 at 6:00 am

    The examples on the home page are a nice way to quickly show the features of a language. I'll check the documentation to see how to work with files, make HTTP calls, parse JSON.

    It's the first time in more than 10 years that I actually feel like trying a new language. The last time was Elixir. Since then I had to use Lua (hobby project) and Python (work) but I don't enjoy them much. I would have skipped them if I hadn't have to use them. Before Elixir I enjoyed Ruby, before that it's been Perl 5 in the 90s. Everything else I used in that period and before was because I had to (C, Java, PHP, JavaScript/Node) and I skipped many other mainstream languages because they didn't look nice to work with (Go, Rust, TypeScript.) I still have to see what's writing and running a Rhombus programs looks like so I might discover that it's not so nice after all. I'm hopeful.

Leave a comment

In the Shadows of Innovation”

© 2025 HackTech.info. All Rights Reserved.

Sign Up to Our Newsletter

Be the first to know the latest updates

Whoops, you're not connected to Mailchimp. You need to enter a valid Mailchimp API key.