Live data from Hacker News

Rhombus Language 1.0

blog.racket-lang.org

61–70 of 115 posts

Re: Rhombus Language 1.0

#61

I'd love to get a talk on this at the 2027 Carolina Code Conference (polyglot and cybersecurity). Call for Speakers will open in January. https://carolina.codes

Looks like a real conference - but the first thing you see is a large image of Rick Astley ?!

Re: Rhombus Language 1.0

#62
post #48

Earlier quoted context omitted.

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

I did not take this in consideration, because for such code, with brackets and separators, I prefer to align the separators with the opening and closing brackets, like this:

  ( ...
  | ...
  | ...
  | ...
  )
or

  { ...
  ; ...
  ; ...
  ; ...
  }

Re: Rhombus Language 1.0

#63
post #4

Earlier quoted context omitted.

Racket is already approachable and easy to use for everyday purposes

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.

It's not unreasonable to dislike coding in s-expression syntax. It is not very readable.

There's a reason the vast majority of programming languages (especially weighted by popularity) use more traditional syntax.

Re: Rhombus Language 1.0

#64
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.

That's why you use an autoformatter.

IMO the biggest downside is that it gets awkward to do closures and inline expressions and things like that. For example Python's `lambda` and if-else expression which are super weird and special snowflakey compared to the equivalents in e.g. Rust or OCaml or even Tcl.

Maybe there's a way to do it nicely; I haven't thought about it too much.

Re: Rhombus Language 1.0

#65
post #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

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

Re: Rhombus Language 1.0

#66

    fun repeat(str :: String, n :: Nat) :: List:
        [body]
I may be over-sensitive to looks but... god why ?

    fun repeat(str: String, n: Nat): List = 
would be prettier. (I guess authors had to compromise in affecting symbols)

Re: Rhombus Language 1.0

#67

"Modern programming languages reflect a consensus on the the most important programming concepts, including lexically scoped variables, closures, objects, pattern matching, and type parametricity. Why, then, yet another programming language?" I don't want to be too nitpicky but ... the sentence has two "the", aka "the the most important". It is a really irrelevant error, but on the other hand, has nobody ever read th…

Thanks for the report. I just made a PR to fix it. I was not involved in writing this, but in my experience it's better to edit the text in Google Docs or something similar that catches all these easy typos. But it's harder to collaborate and make it git friendly, so I guess they just used a standard editor that has less support for this kind of errors.

Haven't tried it, but isn't collaborative editing what the zec.dev people are working on?

Re: Rhombus Language 1.0

#69

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

I agree 100%. Racket is Awesome.

The Rhombus implementation is about 70% Racket!

Re: Rhombus Language 1.0

#70
post #65
post #29

Earlier quoted context omitted.

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

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

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.

Post reply on HN