Live data from Hacker News

Rhombus Language

rhombus-lang.org

1–10 of 161 posts

Re: Rhombus Language

#2
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

Re: Rhombus Language

#3
post #2

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:…

> Why a new language? See Rhombus Goals.

Rhombus Goals links to: https://rhombus-lang.org/goal.html

Re: Rhombus Language

#4
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

Re: Rhombus Language

#5
post #2

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:…

here is the "goal" page: https://rhombus-lang.org/goal.html (with related paper & talk)

Re: Rhombus Language

#6
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".

Re: Rhombus Language

#7
post #2

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:…

> Why a new language? See Rhombus Goals. Rhombus Goals links to: https://rhombus-lang.org/goal.html

Graaah, totally missed it. Thanks!

Re: Rhombus Language

#8
post #5
post #2

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:…

here is the "goal" page: https://rhombus-lang.org/goal.html (with related paper & talk)

Thanks. It’s nice to see at least a few in the FP community recognize that Lisp dialects, with their parenthesis-ridden S-expressions, are hard to read and write.

Re: Rhombus Language

#9
post #6

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".

I guess it's a typo and the second line should say "BR". I just send a PR to fix it.

Re: Rhombus Language

#10
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 reply on HN