I have used Racket in production for a decade and a half, with great success. Racket belongs to a sort of invasive species equivalent in languages, in the sense that once it has a hold on you, all other languages, old and new, vanish from your mind. The elegance of Scheme married with the power of hygienic macros does a great job at tricking your mind into believing Paul Graham's Hundred-Year Language idea again. Wha…
Rhombus Language
131–140 of 161 posts
Re: Rhombus Language
#132The 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.
Re: Rhombus Language
#133Earlier quoted context omitted.
When the pattern `[Posn(x, y), ...]` matches a list of positions, since `Posn(x, y)` is followed by `...` the `x` is bound to a sequence of first coordinates and `y` is bound to a sequence of second coordinates. In the template the `Posn(y, x)` is followed by `...` so the same number of positions is produced as the common length of x and y.
What would be the corresponding syntax for matching and flipping only the first Posn? If I had to guess: fun flip_all([Posn(x, y), rest]): [Posn(y, x), rest] If I am correct then the only difference between flipping all and flipping just the first is `...` vs `rest`
fun flip_first([Posn(x, y), more, ...]):
[Posn(y, x), more, ...]Re: Rhombus Language
#134How hard would it be to uniquely extend the language to make *fun* into *fn* and *...* into a single letter *…*? fun all_same([str0, str, ...]): all(str0 == str, ...)
#lang rhombus
import rhombus:
only: fun ...
rename fun as fn
rename ... as …
open
fn all_same([str0, str, …]):
all(str0 == str, …)Re: Rhombus Language
#135Earlier quoted context omitted.
I’m not sure about Go being full of footguns, but for one, a panic in any goroutine forcibly terminates the entire application.
I think that's the intention of a panic.. however there is still recover if you need to "catch" it.
Re: Rhombus Language
#136I have used Racket in production for a decade and a half, with great success. Racket belongs to a sort of invasive species equivalent in languages, in the sense that once it has a hold on you, all other languages, old and new, vanish from your mind. The elegance of Scheme married with the power of hygienic macros does a great job at tricking your mind into believing Paul Graham's Hundred-Year Language idea again. Wha…
Can you tell me more about what you're building with Racket? Warms my heart to hear about/see Racket being used in production.
Re: Rhombus Language
#137Earlier quoted context omitted.
I’ve used it for all kinds of production stuff over the years, from web to desktop and mobile apps.
Interesting, how do you distribute/publish those apps?
Windows/Linux/macOS: same as web, using cross-compilation[5]. Additionally for macOS, embedded in a Swift app and distributed as a .dmg[2] and on the Mac App Store[3]
iOS: embedded in a Swift app and distributed on the App Store[4].
[1]: https://docs.racket-lang.org/raco/exe-dist.html
[3]: https://apps.apple.com/us/app/franz-apache-kafka-client/id64...
[4]: https://apps.apple.com/us/app/podcatcher-podcast-player/id67...
Re: Rhombus Language
#138Earlier quoted context omitted.
I think that's the intention of a panic.. however there is still recover if you need to "catch" it.
The issue is you need to explicitly recover each goroutine just so a nil dereference or a panic from a library you have no control over doesn’t bring down the whole application. Maybe this is the way it has to be, but it is a little known fact that might bite you.
I’d be interested to know which libraries you’re working with where this has been a problem because I’ve only ever experienced one occasion where a 3rd party library panicked unnecessarily.
Re: Rhombus Language
#139Earlier 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…
Did you ever see Crystal? It's more or less a typed Ruby. I've heard that you can port some code directly. https://crystal-lang.org/
Also, I've come to prefer more FP.
Re: Rhombus Language
#140Earlier quoted context omitted.
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.
In 3.4 you can now do x.map { it + 3 }.sum which I'm still getting used to