1. 80
    1. 32

      Before reading this article, I didn’t really think Raku needed to exist.

      Afterwards, I still sure as heck don’t want to ever use it for anything, but I’m pretty glad that it does exist. The world needs gremlins doing gremlin-y things from time to time, if only for contrast.

      1. 13

        It’s a big collection of things that seemed like a good idea at the time.

      2. 10

        Raku is a perfectly fine language for application programming, and better than most in common use. Its idiosyncrasies are just unfamiliar to you. I wouldn’t use it only because I think that common lisp is broadly better where it counts, but nothing about the language makes it unsuited to writing applications. If I were more inclined towards unix, text-processing applications, or scripts, I would probably use it.

        1. 12

          I think it perfectly continues the long Perl tradition of “there are a dozen ways to do this and if your team doesn’t agree on basically everything, you’re in for a wild ride”. Not unique though, Scala also seems to have this.

          1. 2

            Can you expand more on Scala? I’ve been told the opposite regarding Scala, though I haven’t had the time to dig in.

            1. 4

              You can write Scala that looks like Java, but just replace the types with var/val. You can also write Scala that looks like a little verbose Haskell.

              Mind you, I am not a Scala programmer, I started to learn it many years ago and felt it was kinda ok, and then I stumbled over a couple of libraries that were written in a way that in my learning journey I had no chance of understanding, scalaz might have been involved. I’m not saying that is an objective criticism but I prefer languages where you either have idiomatic code most of the time (at least when you look at code written by medium level users and not total beginners who just something that compiles) and that has been my main problem with Perl as well. Wildly different philosophies how code should look, varying per project or library and sometimes per file. That’s the reason I stopped learning Scala.

        2. 9

          Kindly allow me to know what I’m talking about.

    2. 26

      I feel like this is what you get when you do cocaine off the dragon book and just read the parsing sections back to front and right to left.

    3. 19

      I find myself completely uninterested in most programming languages except when it comes to dealing with whatever I need for work. Ruby has been the only language so far that I’ve found enjoyment from because of how normal or weird you can be with it. But something about the - I wouldn’t exactly call it chaos per se, but - madness of Raku excites me. I think it’s the “junk drawer” nature of what I’m hearing about it. Ruby feels the same way to me. It’s, like, I can choose to write totally mundane code, or I can start pulling things out at random and just vibe.

    4. 14

      After reading the comments here I realize that I’m not alone in my reaction to Raku: I’m simultaneously not interested in using it at work but I’m glad it exists.

      Even as alot of languages consolidate around useful syntax and patterns, we need languages out there pushing the edge of expressivity and even syntax and extensibility.

      I recently told a friend that Raku is like the psychedelic art of programming languages. It’s the one of the few languages I’d describe as “extra”.

    5. 13

      I hate read the Camel book back when my job had an O’Reilly subscription. It was just the most fascinating collection of smart people working smartly to enable dumb things I had ever seen, and I couldn’t look away. :-)

    6. 9

      It seems Raku keeps the Perl quality of readability vs writability. I’m pretty sure I can write it with some practice, but I’m not sure I can read it regardless of my efforts.

    7. 4

      I think if I had to maintain a Raku legacy codebase my brain would explode.

      This is how I felt just reading the code samples

    8. 4

      how do people generally set up their keyboards to input those characters? that’s an interesting story - I’ve never seen a writeup on that

      1. 4

        I use a bunch of hotstrings in AutoHotKey, I can type ∈ by typing ;in

        1. 2

          That’s cool. This approach requires a few keystrokes though - do you find yourself wishing you could chord them?

          1. 1

            I originally set a few symbols to chords but find hotstrings both easier to remember and more extensible. At this point I have over 70 hotstrings; remembering 70 chords would make my head explode, much less fitting them all on the keyboard =)

      2. 2

        The Julia editor plugins and repl let you enter latex commands for the symbols then press tab to convert them. It works pretty well, though I would prefer something that let me fuzzy search based on longer descriptions of the symbols and showed a preview of what they looked like, maybe I should write that.

      3. 2

        If you are using X, then you can put it into .XCompose - e.g.,

        <Multi_key> <e> <u> <r> : "€"
        <Multi_key> <i> <n> : "∈"

        (keep in mind that it is eager: that is, you cannot have multiple sequences sharing the same prefix - “in” will mach before “into” or “infty”)

        If you use Emacs, then you have really too many ways to approach this. The one I use the most is abbrev-mode, with e.g. (they are spread over multiple different tables in my init.el):

        (define-abbrev-table 'my-abbrevs-table
            ("8exists" "∃" nil)
            ("8in" "∈" nil)
            ("8inf" "∞" nil)
            ("8int" "∫" nil)
            ("8nexists" "∄" nil)
            ("8index" "☞" nil)
            ("8interrobang" "‽" nil)
            ("9ds" "" (lambda nil (insert (format-time-string "%Y-%m-%d %a %H:%M"))))

        Of course, Emacs has something like this already built-in: set-input-method (C-x RET C-\) allows you to choose TeX, which lets you use LaTeX-like syntax for many symbols (e.g, \in, \infty, \exists), and insert-char (C-x 8 RET) gives you access to all of Unicode.

      4. 2

        This question made me want to look into it for my own use:

        For Gnome, IBus is used, which can read a .XCompose file, which can be formatted like

        include "%L"
        <Multi_key> <e> <l> <o> <f> : "∈" U2208

        which gives me access to such a symbol using the Compose key

        A chorded approach might be possible, Custom keyboard layout with the relevant symbols as the third option (shift is second, usually right alt is third), or a plugin for ibus might also be appropriate.

        Before now I’ve just used copy paste however.

        1. 3

          Another useful way is Emacs’ TeX input-method, where you can type \in and it will give you ∈.

        2. 1

          For a pre-created .XCompose file with many mathematical symbols etc. already defined, see https://github.com/kragen/xcompose

      5. 1

        I use WinCompose (the docs recommend it, but I already had it installed for other reasons). It makes characters very easy to enter - Alt+>> for », Alt+{( for ⊂, etc. I had to put in my own sequence for 「」, which it also makes easy.

    9. 3

      The summary really resonates with me. I would love to pick up Raku and use it for scripting instead of Python and Fish/sh. But it’s a manic language with too many anti-features, and bizarre operators and syntax/semantic choices. It really needed a once-over on the syntactic/UX front by people from outside the Perl/Raku community to normalise it before it’s worth investing time into as something you can consider being sane into the future.

    10. 3

      Raku is the only language I’ve ever seen that has $kebab-case names and infix subtraction, I’m guessing because sigils disambiguate x-y.

      PowerShell has this.

      1. 2

        I think there’s a couple of others that disambiguate by requiring spaces around operators too.

    11. 1

      Multiple dispatch + guards or (better) pattern matching is something I think I’d like (tho they might make the method precedence rules too complicated). Z+ and friends are pretty cool, and with the sigils they’re disambiguated from the bindings.

      1. 2

        Erlang/elixir and co have this kind of pattern matching. It is something i think should be table stake these days for languages.

        Note that in theory most of these could be defined in a type system and as such this kind of pattern matching look a lot like a nice continuum of runtime/compile time set of rules. And the cursor, in theory, could move depending on all kind of heuristics.

        In practice fast efficient type checker for these ruleset are not really that available in the industry, but there are some research.

        1. 1

          In elixir the order that methods are defined has a big influence on what method is chosen for a given set of arguments. That’s fine, but it doesn’t seem compatible with the open functions of something like Julia where we want different packages to define methods for the same functions.

    12. 1

      Raku has no qualms about using Unicode operators

      Wonderful feature—increases readability since you’re writing what you mean. If it were a little more ML & a little less Perl, this would be something I’d rush to pick up. The grammars features is super cool too.

      1. 1

        Then you might enjoy looking at Lean. It’s basically LiquidHaskel plus Unicode symbols for all the obvious things)

        1. 1

          I’m leery of another language running out of the Microsoft mill. I’ve not looked into how much independence the project has yet.

          Agda is Unicode-heavy, ML-family theorom prover already.

          1. 1

            It has academic roots like Agda, so it’s not out of the MS mill per se.

            It’s more one of those things Microsoft is determined to keep up with for fear of missing out.

            1. 1

              That’s good info to know. I’ve watched it from very far away not knowing if I should trust it. I can’t help but love the clever typographic logo too ha.