Live data from Hacker News

Rhombus Language 1.0

blog.racket-lang.org

41–50 of 115 posts

Re: Rhombus Language 1.0

#41

Earlier quoted context omitted.

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

This is survivorship bias. People who don't like s-expr aren't lispers. I've used Lisp before. I can read s-expr code. Unfamiliarity is not the issue. I just don't like them. I don't like Haskell/ML either, and I've written large projects in both, so it's not a Lisp-specific thing.

Considering your experience and preferences, what do you like?

Re: Rhombus Language 1.0

#43
post #21

Earlier quoted context omitted.

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…

That's horrifying.

At least it shows that the authors are aware of this issue and planned for it.

Re: Rhombus Language 1.0

#44
Once you have a bicameral syntax*, is there much point left in formal language theory? For instance, why would you still need complicated notions like LR(k) grammars (which Wikipedia confuses with LR(k) parsers)? I ask out of genuine confusion: I've been reading about formal grammars, and have even added to Wikipedia - but I'm still puzzled as to why PL designers might choose to have hard-to-parse syntaxes. Why don't people instead adopt an intermediate syntax like Rhombus's shrubbery notation†?

* - https://parentheticallyspeaking.org/articles/bicameral-not-h...

† - https://docs.racket-lang.org/shrubbery/index.html?fam=Rhombu...

Re: Rhombus Language 1.0

#45
post #6

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.

Adding significant whitespace to a new language feels like a bad choice. It's not terrible but I do think it was a bad call for Python in hindsight.

At least here they provide an alternative syntax that does not need significant indentation, so a program structure may be written on a single line.

Re: Rhombus Language 1.0

#46
post #40
post #8

Earlier quoted context omitted.

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.

Any language with significant indentation ends up specifying "Indent with spaces, not tab characters" for just that reason. As I recall, Python had that as a recommendation while F# ended up with it as a requirement, but it's been a while since I looked at that so I could be wrong. But in my experience, the category "people who complain about significant whitespace" is nearly a subset of the category "people who pref…

For me, the alternative solution makes much more sense for a language with significant indentation, i.e. to use only tabs for indentation and to completely prohibit spaces before the first printable character of a line.

I do not know why I have never seen this solution in practice.

Re: Rhombus Language 1.0

#47

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.

Racket is already approachable and easy to use for everyday purposes

Being in the Lisp family, an often heard criticism is its use of parenthesis (disclaimer: I understand the difference between syntax & semantics. But syntax does matter).

Is this an issue in Rhombus? Or Racket?

Re: Rhombus Language 1.0

#48
post #40

Earlier quoted context omitted.

Any language with significant indentation ends up specifying "Indent with spaces, not tab characters" for just that reason. As I recall, Python had that as a recommendation while F# ended up with it as a requirement, but it's been a while since I looked at that so I could be wrong. But in my experience, the category "people who complain about significant whitespace" is nearly a subset of the category "people who pref…

For me, the alternative solution makes much more sense for a language with significant indentation, i.e. to use only tabs for indentation and to completely prohibit spaces before the first printable character of a line. I do not know why I have never seen this solution in practice.

It depends on the language's indentation requirements. That can work in Python, where you never need to line things up with characters above that aren't a multiple of an indent level. But in F#, at least a few years ago when I tried it, there are times when you would need (or strongly want) to line things up with other characters. For example, this example from https://learn.microsoft.com/en-us/dotnet/fsharp/style-guide/...:

    functionName
        arg1
        arg2
        arg3
        (function
         | Choice1of2 x -> 1
         | Choice2of2 y -> 2)
Note how the | needs one extra space in order to line up with the word "function", due to the open parenthesis. If you're using tabs for indentation, that means you need a series of tabs plus one trailing space after the tabs, in order to line up the | correctly.

Any situation where you must have a mixture of tabs and spaces for code to work right leads to a nightmare. Because it makes you have to turn on visible whitespace in your editor and peer closely at the lines. I have a simple rule: "Do NOT make me care whether there are tabs or spaces in this file!" If it's significant whether a line is indented with a tab or space, then that rule is broken, and you're probably in for a bad time. (Case in point: Makefile syntax).

Re: Rhombus Language 1.0

#50
post #49
post #42

https://rhombus-lang.org/performance.html

Thanks to Chez Scheme I guess...

Yes, Chez Scheme is fast but it took a lot of time (a few years!) to make the compiler translate Rhombus/Racket code to fast Chez Scheme code. And there are still a few rough corners to fix...

Also, Matthew implemented flonum unboxing to make code that uses a lot of floating points like x10 faster. I added type recovery, that gives a 10% boost in many cases. And I'm probably missing a few similar features.

In most cases the Chez Scheme team also was involved. Those changes were upstreamed, so you can enjoy them in Rhombus, Racket and Chez Scheme.

Post reply on HN