Live data from Hacker News

Rhombus Language 1.0

blog.racket-lang.org

21–30 of 115 posts

Re: Rhombus Language 1.0

#21
post #8

Earlier quoted context omitted.

why do you think it was a bad choice?

It‘s a source of problems with mismatched tabs/spaces being used for indentation between team members for fairly little upside. Imo it also makes moving blocks of code more cumbersome.

Shrubbery, Rhombus's first-pass indentation-sensitive syntax, has a syntax form to facilitate copy-paste.

With guillemets, « and », you can make a section of Shrubbery code indentation-insensitive. The idea for copy-paste it to "armor" the section you want to copy with guillemets in the right places, and unarmoring it after posting.

This needs editor support to do fluidly, but imo it's much better than trying to copy-paste the indentation-sensitive syntax.

The Guillemets syntax is described here: https://docs.racket-lang.org/shrubbery/group-and-block.html#...>

I can't tell from my 5 minutes of poking DrRacket whether it supports this "armoring", I've been writing Shrubbery in nvim, which, unsurprisingly, does not support it.

Re: Rhombus Language 1.0

#22
post #12
post #4

Earlier quoted context omitted.

A lot of people hate sexprs. Even seemingly reasonable folks. I imagined they have met students that really struggle with the syntax, while grokking the concepts easily. I myself have heard "the parentheses are hard to balance" and "after a while you dont even see the parentheses" enough times that I think maybe both can be correct.

My editor balances my parentheses (Emacs Paredit). I rarely think about them. I just think structurally and the editor manages the details.

It really feels like, "when I move through the wasteland, I only focus on the path and GPS is guiding me well".

For some reasons, people tend to prefer having a walk in a forest rather than in z wasteland.

Re: Rhombus Language 1.0

#24

You can read about Shrubbery, just adding the Rhombus syntax in Racket: https://docs.racket-lang.org/shrubbery/index.html

What with the term itself, is that some monthy python reference or related to tree algebraic structure?

Matthew Flatt picked “shrubbery” because it’s tree-like but not fully expanded, so it tends to be more broad/flat than deep like a tree. Hence also the term “enforrestation” when you fully expanded it.

I think the Monty Python reference is just a happy coincidence.

Re: Rhombus Language 1.0

#27

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.

With current LLM I am not sure. Using macro, you can often spare a lot of explicit code boilerplate. So token efficiency. On the other hand, will LLM shine in such a paradigme, where picking the right abstraction is more useful than generating large amount of lines?

Maybe it's a lake of training set, but just roaming the fine article, it already mention a LLM generated project which is more looking like Java idiomatic rather than something authors would consider elegant Rhombus code.

Re: Rhombus Language 1.0

#28

Earlier quoted context omitted.

What with the term itself, is that some monthy python reference or related to tree algebraic structure?

Matthew Flatt picked “shrubbery” because it’s tree-like but not fully expanded, so it tends to be more broad/flat than deep like a tree. Hence also the term “enforrestation” when you fully expanded it. I think the Monty Python reference is just a happy coincidence.

Nice to get so much insightful feedbacks. That's the kind of exchange that make HN still sometime interesting.

Re: Rhombus Language 1.0

#29

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…

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.

https://github.com/bjoli/RrbList/tree/main/src/Collections

Re: Rhombus Language 1.0

#30
post #4

Earlier quoted context omitted.

A lot of people hate sexprs. Even seemingly reasonable folks. I imagined they have met students that really struggle with the syntax, while grokking the concepts easily. I myself have heard "the parentheses are hard to balance" and "after a while you dont even see the parentheses" enough times that I think maybe both can be correct.

> A lot of people hate sexprs In all my time I have never come across a single Lisper, neither in person nor online, and I know far more than a few dozens, who once grokked the REPL-driven workflow and the structural editing idioms only to later, for whatever reason, suddenly start disliking or even hating s-expressions. All that so-called "hatred" stems from unfamiliarity. People fuss about Lisps lacking static type…

As I said, i think they have been teaching long enough to have a pretty good basis for the claim that racket's syntax can be a problem.

I am firmly in the "after a while you don't see the parentheses" camp, but I have a friend who I respect a lot who works in clojure (with Emacs/cider/paredit) that just doesn't like it.

I mean, I prefer sexprs above all other syntaxes, and I have had people tell me I just need to get used to indentation syntax or whatever they fancy.

Post reply on HN