Rhombus Language 1.0

blog.racket-lang.org

121 points by Decabytes a day ago


ashton314 - 4 hours ago

I’ve written a little library Rhombus.

I think my favorite thing is the `…` operator. Go check it out. It’s not like the splat operator in other languages, though it does give that feel initially. It’s much more general: it works with nested data structures and can take the place of a `map` operation.

The best part of `…` is that it is not a built-in thing—it’s just a macro! The magic is that Rhombus lets you define different macros depending on whether or not the macro identifier appears in binding context (left side of `=`), expression context, or some other contexts. IIRC you can even define your own contexts too.

Rhombus takes the best-in-class macro system of Racket and somehow finds a way to improve upon it. I say this after researching and comparing detailed metaprogramming features across a dozen different languages. Rhombus is a very neat little language.

Last thing: Rhombus’ main data type, the list, is implemented with an RRB tree. RRB trees support structural sharing, functional updates, and have O(log n) iterate, insert, delete, append, and arbitrary read operations. The constant factor on that is tiny: I think it’s like log_16 or log_32. They’re designed to be very cache friendly. Super cool data structure.

gus_massa - 4 hours ago

I was not very involved in this. I still prefer s-expressions.

Anyway, my main initial concern was how to make good macros without s-expressions. There is a nice video by Matthew Flatt in RacketCon 2023. The first 6 minutes and 20 seconds are internal stuff, so skip to the 380s that I added in this link: https://www.youtube.com/watch?v=OLgEL4esYU0&t=380s He takes like another 6 minutes to explain the general idea and make some wishes, and then at the 12m mark he defines macros in Rhombus and makes the wish real in just 2m (with some enhancements later).

azhenley - 3 hours ago

You can read about Shrubbery, just adding the Rhombus syntax in Racket:

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

brightball - 3 hours ago

I'd love to get a talk on this at the 2027 Carolina Code Conference (polyglot and cybersecurity). Call for Speakers will open in January.

https://carolina.codes

dang - 6 hours ago

Related. Others?

Summer Rhombus picture competition 2026 - https://news.ycombinator.com/item?id=48546270 - June 2026 (2 comments)

Rhombus Language - https://news.ycombinator.com/item?id=43394881 - March 2025 (158 comments)

Rhombus: Macro-extensible language with conventional syntax built on Racket - https://news.ycombinator.com/item?id=41151439 - Aug 2024 (97 comments)

State of Rhombus (programming language) - https://news.ycombinator.com/item?id=30314109 - Feb 2022 (17 comments)

spdegabrielle - a day ago

Rhombus is designed to be

* approachable and easy to use for everyday purposes, with a readable indentation syntax; and

* uniquely customisable with an _open-compiler API_ that is accessible to a wide audience.

dartharva - 3 hours ago

I wonder how much utility of such special-purpose languages will keep getting diminished as AI coding becomes a staple in programming and software engineering.

monkamonme - an hour ago

[flagged]