Live data from Hacker News

Rhombus Language

rhombus-lang.org

71–80 of 161 posts

Re: Rhombus Language

#71
post #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, especiall…

I really wish they had kept the old C-like Honu syntax rather that the Python-like Shrubbery. If Rhombus is supposed to be an educational language, copy-pasting and trying out new code is going to be a important part of ecosystem, and indentation based syntax is not ideal for that.

A valid point.

There is a long history of identifying the problems and risks of copy-pasting, and trying to reduce it. I remember it was a selling point of Java in the early days. For all the efforts it doesn't seem to be going away. (all the boilerplate in Java probably didn't help)

I'd love to see a C-like Rhombus. A Chombus.

Re: Rhombus Language

#72
post #44

Earlier quoted context omitted.

Curious to read that because I’ve always had the opposite opinion of the above: Typescript looks nice to work with but the tool chain is horrible (this isn’t really Typescripts fault though, more a synonym of it having to compile to JS). Go looks horrible to work with (too simplified syntax) but is actually really nice because the tooling is (mostly) spot on and it’s simplified syntax weirdly helps with maintainabili…

I’m not sure about Go being full of footguns, but for one, a panic in any goroutine forcibly terminates the entire application.

The constant incantation of if err != nil is bad for my aging hands and frankly hurts even more when you see Rust's single-character error marshalling using ? operator.

Re: Rhombus Language

#73
post #18

The examples on the home page are a nice way to quickly show the features of a language. I'll check the documentation to see how to work with files, make HTTP calls, parse JSON. It's the first time in more than 10 years that I actually feel like trying a new language. The last time was Elixir. Since then I had to use Lua (hobby project) and Python (work) but I don't enjoy them much. I would have skipped them if I had…

From Rhombus you can call all the Racket libraries. I used Racket in a few projects:

* To edit a Moodle backup file, I used Racket to unzip it, find the xml file, parse and filter some of the parts of the xml file and then zip the new version.

* To autoreply some emails, I used IMAP, then scrap some info from my webpage and then SMTP.

There is also a JSON library, but I never used it.

The only problem is that some libraries have no wrappers still, so instead of the expected snake_case name you must use the spear-case with some delimiter to make the parser happy. (Something like |spear-case| or {spear-case}, I should check the docs.) And if that annoys you too much, it's easy to write a macro with a rename transformer so you can use the nice snake_case name, it adds a negligible compilation time and no penalty at run time.

Re: Rhombus Language

#74
post #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, especiall…

I really wish they had kept the old C-like Honu syntax rather that the Python-like Shrubbery. If Rhombus is supposed to be an educational language, copy-pasting and trying out new code is going to be a important part of ecosystem, and indentation based syntax is not ideal for that.

I guess. Truth be told I've taught hundreds, bordering on thousands of undergraduate intro courses in python, and students mostly figure it out after they configure tabs and spaces.

Re: Rhombus Language

#75
post #44
post #29

Earlier quoted context omitted.

TypeScript & Rust don't "look nice to work with" because they force you to write maintainable code that doesn't just stop working because of a random runtime error. In my opinion, Go looks nice to work with but actually is a hidden monster full of footguns.

Curious to read that because I’ve always had the opposite opinion of the above: Typescript looks nice to work with but the tool chain is horrible (this isn’t really Typescripts fault though, more a synonym of it having to compile to JS). Go looks horrible to work with (too simplified syntax) but is actually really nice because the tooling is (mostly) spot on and it’s simplified syntax weirdly helps with maintainabili…

> Typescript looks nice to work with but the tool chain is horrible (this isn’t really Typescripts fault though, more a synonym of it having to compile to JS).

It's not even inherent to TS that the toolchain must be a morass of moving parts and multiple config files, as shown by Deno in contrast to Node.

Re: Rhombus Language

#76
post #34

Does anyone use Racket outside academia? Is it production ready (or friendly)? Especially Typed Racket.

I have one day of college under my belt and use Racket for all my personal projects, as well as in a few areas related to ERP systems professionally. I have found no compelling reason to use Typed Racket so far.

[edit to clarify: I am not in college. I’m in my forties and have 25 years experience as an IT/programming/accounting generalist.]

Re: Rhombus Language

#77
post #34

Does anyone use Racket outside academia? Is it production ready (or friendly)? Especially Typed Racket.

I tried, it's a really nice language with almost no libraries so you end up reinventing the world every new thing you do. It's not really practical compared to arguably worse languages with better ecosystems

It has a lot of libraries. Can you give some examples of the gaps you are talking about?

Re: Rhombus Language

#78
post #8

Earlier quoted context omitted.

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.

It is hard to have empathy for a problem you don't have. I have only recently become open to the idea that people might legitimately experience pain using an unfamiliar syntax. For me, it is a non-issue. From Lisp to C to APL to Forth to Prolog, syntax was never an issue for me. I greatly enjoy learning languages with different approaches to syntax. It has never caused me pain. Only joy. Then again programming langua…

Learning s expressions and the evaluation rule takes about 13 seconds. It’s one of the very first things in SICP. Learning how to use the loop macro, well, I’m still working on that.

Re: Rhombus Language

#79
post #46

Earlier quoted context omitted.

I found Kotlin a "typed Ruby" (I found Ruby a "sane Perl"). Rust seems pretty nice to work with (good DX) in it's domain: close to the metal programs were every tick counts. The main DX issue with it would be compile times. Go's awful to me from a DX perspective as it is lacks proper error handling. Compile times are great though. Maybe OCaml is a good fit for me (and you!). Fast compile times and good error handling…

Interesting. I learned Ruby a long time ago because a Perl expert told me Ruby was getting good. I like Typescript because it's really easy to read and maintain without breaking anything. But you can't do this: `next x.map { _1 + 3 }.sum if sth`. I guess I should give Kotlin a try then.

After 20 years of Ruby I didn't know (or didn't remember) that next can have an argument. I looked it up. Thanks.

BTW, I never liked the _N arguments. Too cryptic. They make me stop and think on details instead of just read the code and concentrate on the important stuff.

  x.map {¦n¦ n + 3}.sum
is immediately clear but I guess that it's very subjective.

Re: Rhombus Language

#80
post #18

The examples on the home page are a nice way to quickly show the features of a language. I'll check the documentation to see how to work with files, make HTTP calls, parse JSON. It's the first time in more than 10 years that I actually feel like trying a new language. The last time was Elixir. Since then I had to use Lua (hobby project) and Python (work) but I don't enjoy them much. I would have skipped them if I had…

I was skeptical when I heard “Python-like Racket syntax,” but this certainly looks like the Python I wish I was writing.

Edit: racket is a nice language, went my thinking, why give it a Python syntax? But I think they’ve answered that.

Post reply on HN