3 ms·
Non-interactive shell scripting. It's actually the best language in this niche, outclassing Perl and Tcl in terms of features and Python/JS in terms of expressi
by klibertp 2y ago
Non-interactive shell scripting. It's actually the best language in this niche, outclassing Perl and Tcl in terms of features and Python/JS in terms of expressivity.
General purpose scripting. Orders of magnitude fewer packages and batteries than in Python or Ruby, but it does have a package manager and a bunch of libs for typical tasks. It's also capable of calling Python code almost seamlessly. For small (1 file) scripts, the expressivity of Raku means often half the lines of equivalent Python code, unless you hit a package that Python has and Raku doesn't.
Everything related to text processing. The grammars parsed by Grammars don't have to be context-free. Parsing just about anything is a joy. Also, light data mangling - if it fits in RAM, you might not need any other tool (like R/Pandas).
It's also a general-purpose, gradually typed, JIT-compiled, multiparadigm (OO, FP, procedural, array) language, so you can use just about anywhere you want. It's less great for mission-critical things (error handling is peculiar) and shell one-liners (the JIT takes a toll on startup time). It has a REPL, instead.
- bloopernova 2y agoFantastic answer, actually made me enthusiastic for Raku! Now I want to go mess with it to see what it can do with some of my standard use cases. (DevOps infrastructure code, various AWS Lambdas, lots of build pipelines)
- klibertp 2y agoIf you want a quick overview of what you can do with Raku (as opposed to what it is/how it works), I found this book to be nice: https://leanpub.com/raku-oneliners https://leanpub.com/raku-oneliners Also, make sure to hop on Freenode (or Discord bridge to it), the community is very welcoming :)
- bloopernova 2y agoThanks for the recommendation, I immediately bought that book. I'm a huge fan of people publishing on leanpub or similar :)
- lizmat 2y agoFreenode is actually dead: the Raku IRC channels are on libera.chat!