Skip to content

Comment on Rhombus 1.1 is now available

Comments

Racket was always one of my favorite Lisp / Scheme dialect, mainly because of its very rich ecosystem, you can make websites, GUIs a lot of things with very minimal effort, that and Dr Racket lets you see visually where import goes into code, and a bunch of other nice things.

Rhombus strikes to me as an interesting language in this ecosystem (which it is!) that not only gives you access to all those capabilities, but shows how powerful Racket can be for building programming languages!

That said I have not yet sat down to try it, but as they seem to be doing quick development with it, I just might have to.

The entire Rhombus repo is all Racket:

https://github.com/search?q=repo%3Aracket%2Frhombus++languag...

I really want to like Racket? I really do, but I just never really enjoyed like I liked Python. And despite trying a bunch of other Lisps and liking them, something about Dr. Racket annoyed me. I'm not sure why.

It's "cool" and the ecosystem rules, and it's fast enough, I just never really found that I liked writing Racket or using Dr. Racket the same way I like writing Python so I never really reached for it when I was trying to do something. Indeed, from the first time I looked at Python I liked it. That was not the case with Javascript or Java or C or PHP? I don't know, I like Python and really want a practical Lisp that I can really sink my teeth into? So by all accounts I should love Racket. And yet, I don't.

That said, Rhombus looks really nice at first glance. This might be worth a sustained excursion to build something a bit more fun... I'm kind of excited about this!

Racket was my main language for personal stuff for years despite me never really liking it all that much and not able to put my finger on why. It's not even top 10 languages or top 5 lisps for me but it is just incredibly practical. I have zero passion for this language.

The way I use racket its main competitor is python. It's for when I want to accomplish something with heavy third party deps, and I have zero interest in writing the actual cool code I just need to make some libraries kiss and then use my tool. Not saying that's the case here but maybe racket just doesn't offer you much that python doesn't?

Sounds like you'd get more from just using one of the other lisps you liked, especially if there's a more specialized one that wouldn't be competing with a language you probably would prefer to use anyway. Like eg I have to deal with a lot of lua so I get my lisp rocks off with fennel.

This is something to think about... and you know, the other side of it is, "maybe I should play with Rhombus but also just spend some time playing more in Racket and choose to like it more?" lol - we can do that right? Choose to enjoy things?

One of the things I've really wanted to get into is writing some DSLs and Racket and Rhombus are supposed to be the tools you're supposed to reach for for that?

I don't know, the god's honest truth is that I don't write nearly as much code as I did 8 months ago lol, so maybe just diving into Racket and Rhombus for personal stuff would be fun and it doesn't have to something for work...

Really, the lisps I've really liked are Guile Scheme (ok not a lisp really but lispy enough and I liked it) and Clojure? But though I liked them I never had enough work in them to get really good. I do like Lispy languages in general though (since Emacs Lisp, which is glorious in it's own way), I just need the excuse to start playing with them more because they're fun.

You know what I've been really intrigued with over the years has been uLisp (which should be pronounced Micro Lisp) for microcontrollers (http://www.ulisp.com/), but a really cool project would be a DSL that spits out C for the STM32 boards I play with periodically for embedded stuff? I don't know, maybe after I get the cabin done... that'd be a really fun adventure and writing a DSL for that would make my life immensely easier...

Racket and Rhombus are nice for writing embedded DSLs, yeah. More generally, they're nice for writing macros. Scheme in general is nice for writing macros with its `syntax-case` and first-class notions of syntax objects, but Racket is /really/ nice with its `syntax-parse` and explicit notions of phase levels... If you are interested in learning, Greg Hendershott's "Fear of Macros" is often recommended as a good introduction. https://www.greghendershott.com/fear-of-macros/

I am interested, thanks!

I was reading through "Let Over Lambda" and kind of out of my depth because while I can mostly figure out what's going on I'm not using CL as a daily driver so the book just references functions and I'm like, "well I guess do-thing-nicely, does the thing nicely? Alright, good enough I suppose."

Maybe I should really give things another go with it. Thanks!

Since 1982 I have spent much of the time being paid to work in Lisp languages.

A weird thing: whichever Lisp language I am currently using for work (or a side project) is my favorite.

Man, you’re living the dream.

Racket and Clojure are the primary Lisp languages I like. The only thing I don't like about Clojure is the JVM itself ;) Mainly because Oracle stopped working on making Java have a rich GUI stack, JavaFX was brilliantly done and headed in a positive direction, but once Oracle took over Java, it kind of turned it into "that one backend language" essentially, instead of the cross-platform multi-application need swizz army knife it used to be.

I really highly recommend cljfx if you haven't tried it. It's a Clojure GUI library that works through javaFX. It's an absolute pleasure to work with. It's also designed in an extremely extendable - so can integrate with whichever state management systems you prefer (I have it working with Pathom).

JavaFX itself is pretty much "done". Maybe there are corner cases where it's lacking.. like displaying complex Math equations, drawing the full SVG spec, or making complex charts with UI elements. That said, there are plenty of Java libraries for some of these situations.

The main downside I've found is that my final bundled GUI apps are rather large binaries and they consume a ton of RAM (though I think it's the JVM reserving it mostly). They take a few seconds to launch, but then they're extremely snappy.

Supposedly you can shave the yak further with GraalVM but I haven't gone down that rabbit hole

DrRacket seems to have doing the thing where they implement of a bunch of GUI stuff from scratch and miss a lot of edge cases in the process. It feels unpolished and a bit janky.

DrRacket seems to have doing the thing where they implement of a bunch of GUI stuff from scratch ...

The GUIs actually use the underlying native GUIs thanks to the dynamic FFI. The goal is to have a cross platform GUI. Your program runs on macOS, Linux and Windows without any problems.

But if there is some gui feature, that is only available on one platform, you won't find it in the builtin gui libraries. However, you can always add platform specific functionality yourself.

I can't attest to the implementation. I can only attest to the jank.

The Rhombus gui library provides a reactive framework for constructing graphical user interface (GUI) applications.

https://docs.racket-lang.org/rhombus-gui/index.html?fam=Rhom...

Because it builds on the Racket platform you get one of the only cross-platform uniform gui toolkits that works out of the box.

you might be interested in Hy lang

shows how powerful Racket can be for building programming languages!

Building languages was always one of selling points racket tried to push; the "Language-Oriented Programming Language" slogan and all.

And it's true, and one of the reasons that Racket (and other beefy Schemes) is easily tied for my favorite language.

But I have to use other languages, like Python, JavaScript, and Swift, for employability and (sometimes) ecosystem/integration reasons.

FWIW Rhombus is about 70% Racket and 30% Rhombus (by loc)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.