Since I wrote a SHA-3 implementation in Raku while also writing one in Lean 4, I thought I might as well share the Raku version too. Raku is a fun language. You can find it here: https://github.com/gdncc/Obscure
#rakulang #cryptography

Since I wrote a SHA-3 implementation in Raku while also writing one in Lean 4, I thought I might as well share the Raku version too. Raku is a fun language. You can find it here: https://github.com/gdncc/Obscure
#rakulang #cryptography
@profoundlynerdy just because something has types doesn’t make it Haskell-like. Haskell’s type system is in the family of Lambda Calculii (the “Lambda Cube”) which is called “System-F”.
I don’t know much about Raku, but it seems to me to me to be a bit more similar to TypeScript. And what differentiates TypeScript from other languages: it takes a horrible programming language like JavaScript and makes it less bad by giving it a type system, likewise Raku makes Perl less bad in the exact same way. (Sorry, I’m not trying to be impolite, but JavaScript and Perl are objectively, truly awful, horrible programming languages.)
So I see both Raku and TypeScript only being useful to a company buried in the technical debt of a hugely profitable production application that was very unwisely written in a dynamically typed language (Perl or JavaScript), which then unfortunately grew to millions of lines of code, and now it can’t be maintained by anyone, and it could never possibly be rewritten from the ground-up in a good programming language like Haskell for any reasonable sum of money. So Raku and TypeScript both offer a half-measure solution to that problem: make the maintenance of horrible computer code a bit easier with a type system.
Haskell was never intended as a fix for horrible code, it took a really good experimental programming language called Miranda and turned it into something that you can use to do real, practical software engineering, and it does it better than any other language ever invented. You write a system in Haskell because you know up front that you want it to be stable and maintained in a cost-effective manner for decades.
Zig is not similar to Raku or Haskell. It is more analogous to what Scala does for Java. Java is already statically typed, but Scala’s type system is better, and it’s runtime is fully compatible with Java. Likewise, Zig is fully compatible with the C language runtime, but provides a slightly different, slightly better static type checking system than the C type system. Zig also solves a bunch of other problems that C has by providing it with modern features like namespaces and modules, which makes it much easier to use than C. Zig is the perfect way to replace old C code with something more modern, but only if you don’t need it to be as rigorously correct as Rust. I think Zig would be a nice language to use to replace non-safety-critical front-end libraries like Gtk, or maybe for things like game engines.
Why is #Rakulang seemingly so underappreciated?
#Ziglang and #Haskell seem to outpace Raku's adoption curve. I say that as a fan of all three languages, I'm not casting shade. One is new and the other is niche, but they both seem to me good comparisons to Raku. Just look at the sizes of each language's subreddit to get a sense of respective community size.
If those are bad comparisons, I'm open to alternatives and polite discussion.
The Weekly Challenge 316: Circular Reasoning #Perl #RakuLang #RustLang #Postscript #CrystalLang #PerlWeeklyChallenge #BlogFiredrakeOrg https://blog.firedrake.org/archive/2025/04/The_Weekly_Challenge_316__Circular_Reasoning.html
I missed colored output of #GNU ld for a long time. I created a simple wrapper script in #RakuLang to provide fairly usable highlighting of the linker messages.
https://gitlab.com/bindiff/ldhilite
Still work-in-progress, but fairly usable now.
Update: Now, the highlighter is a little bit smarter and does not overuse bold text so much.
If you really must have plain #Perl #OOP methods with the same name that differ because of their argument signatures (also somewhat analogous to C++ function overloading), you can use Class::MultiMethods: https://metacpan.org/pod/Class::Multimethods
More from @manwar (including native #RakuLang multimethods) here: https://gist.github.com/manwar/db11c8e7493d37d2d8373fd64ba871bb
#programming #coding #SoftwareDevelopment https://fosstodon.org/@manwar/114076955754327846
In #RakuLang, you can create multiple methods with the same name as long as they have different set of arguments, using the keyword 'multi'. However in #Perl, there is none but ...
https://gist.github.com/manwar/db11c8e7493d37d2d8373fd64ba871bb
#Rakulang question:
How do I create a custom character encoding in Raku?
I assume it has something to do with Encoding::Registry? I don't think the docs directly give an example of registering a custom encoding.
@geerlingguy you may as well look at #Sparrowdo -https://wp.me/p8gE3q-19r which is more like Ansible ( basically just run tasks as normal functions ) but in #RakuLang
What is your favorite or most useful one-liner and why? Any tips for improving the readability of one-liner code?
> If they ever deliver a usable #Raku, I'll be fascinated to try it
What's stopping you?
I feel exceptionally satisfied when any function I write has all of its logic contained on the return line AND the code is readable.
Am I alone in this? Does this say something about my programming style?
@baboond #Refactoring is exactly the opposite of “abandoning the legacy project and starting anew.”
Do you know what usually happens when a company or project *actually* embarks on the latter? Failure and eclipse by the competition.
This thread started with @adanskana asking if he should learn #Perl: https://mastodon.social/@adanskana/112658986556408140
The grand rewrite that was #Perl6 (now #RakuLang) was a decade-plus slow suicide attempt by the Perl community.
FWIW, that variant is called the Raku Programming Language nowadays https://raku.org
@benjamineskola There is a very new OOP system: https://ovid.github.io/articles/the-future-of-perl.html which looks good but I haven't actually used it myself.
I work Cybersecurity, I mostly use #Perl for quick one-off scans when someone asks me, "are we vulnerable to XYZ?" when XYZ has a (mis)configuration element to it.
A lot of my hobby code is using #Rakulang these days as I really enjoy the language's mutability.
I started programming in 1982. Though I'm known as a #Perl developer, I tried to remember every other language I've programmed in.
#BASIC, #C, 6809 Assembler, #Javascript, VBScript (and its many variants), #Java, #Prolog, #RakuLang, #Python, #Kotlin, #COBOL, Easytrieve, and probably a few others.
I wish I had gotten a job in Prolog, primarily because I loved what I could create with it. I don't love programming; I love creating.
What are your languages?
Programmer since the late #80s.
Basic, Pascal, C++, Java, Prolog, Perl, Bash.
Modern times don't suit me, that's why I try #oldbytes. It looks like I would be among nice guys here and I think I am one too.
I'm here for social interaction on #programming. I have a sweet spot for #Perl and another one for #benchmarking.
After having used (and forgotten again) a dozen other languages I hope to finally integrate #Perl6 a.k.a. #RakuLang into my daily life.
I don't plan to pretend being an expert but will rather muse on unknown territory and appreciate feedback.
Actually, the first release of Perl 6 was in December 2015.
In late 2019 it was renamed to the Raku Programming Language https://raku.org
In social media, the #RakuLang tag is recommended, to differentiate it from the tag used by the good people making Raku pottery.