Comment by librasteve
3 days ago
I thought it would be interesting to try the showcase examples in Raku (since I am always saying how good Raku's imitation of Ruby is)...
- https://glot.io/snippets/he42jpfm27
- https://glot.io/snippets/he42trx6w6
- https://glot.io/snippets/he434b6ryj
Obviously Raku leans more to `{}` and `my $var` than Ruby - but otherwise I think it does a credible job. Obviously these are carefully chosen Ruby snippets to highlit its unique abilities in strings, "array math" and classes. On the string interpolation, I would say that Raku has the slight edge (and has the whole Q-slang for a lot of fine grained control). On the array math, I had to apply the (built in) Raku set diff operator ... so I guess that Ruby is a little more natural for this (rather quirky) feature. On the class stuff, again very close. Raku has much more powerful OO under the hood ... multi-inheritance, role-composition, punning, mixins, MOP, and yet is a delight to use in this lightweight way.
For fun, I did the same for OCaml:
Ex 1
Ex 2
Ex 3
Obviously, OCaml is a much lower-level language than Ruby or Raku–notably, regex support is not as great, and we have to explicitly tell it how to print values of custom types. Still, I find its lack of syntax sugar makes it easy to read nearly any OCaml code I come across in the wild!
Man. Haven’t thought about Raku for a while. Does it have a good web framework these days?
The leading web framework for Raku is Cro (https://cro.raku.org) . Cro has deep support for distributed architectures and middleware pipes and a nice templating language.
There are others, notably the more lightweight Humming-Bird https://raku.land/zef:rawleyfowler/Humming-Bird
Also, if you want a more opinionated, HTMX centric web application library, then https://harcstack.org was used to make the new https://raku.org site
See https://rakujourney.wordpress.com/2025/03/30/the-harc-stack/
that’s a name I haven’t heard in a while