6/24/2026 at 1:58:34 AM
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.
by ashton314
6/24/2026 at 5:40:11 AM
Finally someone uses the rrb tree as their main data structure! I implemented it for c# and the performance tradeoff compared to List<> was smaller than i had thought.by bjoli
6/24/2026 at 12:43:44 PM
Interesting.Just a little nitpick on the repo root: "This is not the readme you want, Please go to the src directory." => But there is no readme in src directory
by Rexxar
6/24/2026 at 1:18:42 PM
Thanks! I havet always been linking to the Collections subdir so I have missed this dumb issue. Will fix next time I use a computer. Might be some time though.If you have any questions about the trees, feel free to ask.
by bjoli
6/24/2026 at 2:29:10 AM
> I say this after researching and comparing detailed metaprogramming features across a dozen different languages.I’m very interested in this. What was your research approach? Are there resources you can recommend beyond the documentation for individual languages?
by WalterGR
6/24/2026 at 2:50:54 AM
Here's the paper I wrote: https://lambdaland.org/files/2024_ecoop_type_tailoring.pdfLots and lots of documentation, some experimentation, and asking people. :)
by ashton314
6/24/2026 at 5:48:04 PM
Thanks!by WalterGR
6/24/2026 at 11:06:04 AM
> I think my favorite thing is the `…` operator. Go check it out.I appreciate your enthusiasm. But three dots are really hard to google. Can you provide a link?
by vaylian
6/24/2026 at 11:14:38 AM
Some info here: https://docs.racket-lang.org/rhombus-reference/Repetitions.h...by mkl
6/24/2026 at 11:46:12 AM
> 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.Something akin to `destructuring-bind' in Common Lisp?
by TeMPOraL
6/24/2026 at 11:31:08 AM
That's both extremely neat and, for the time being, extremely hard for me to get my head around. I got it round monads, so I imagine it's just a matter of time!by moomin