Rhombus Language
rhombus-lang.org
Rhombus Language
1–10 of 161 posts
Re: Rhombus Language
#2One 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.
Re: Rhombus Language
#3The 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 Goals links to: https://rhombus-lang.org/goal.html
Re: Rhombus Language
#4[`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
Re: Rhombus Language
#5The 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:…
Re: Rhombus Language
#6class 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".
Re: Rhombus Language
#7The 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:…
> Why a new language? See Rhombus Goals. Rhombus Goals links to: https://rhombus-lang.org/goal.html
Re: Rhombus Language
#8The 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:…
here is the "goal" page: https://rhombus-lang.org/goal.html (with related paper & talk)
Re: Rhombus Language
#9From 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".