Day 14: Writing Faster Raku code, Part I

By Wim Vanderbauwhede Last year, in Perl land, I discussed the result of my attempts to optimize the performance of an expression parser which is part of my Perl-based Fortran source-to-source compiler. An expression parser takes strings representing expressions in a programming language (in my case Fortran) and turns it into a data structure calledContinue reading “Day 14: Writing Faster Raku code, Part I”

Day 11: Santa Claus TWEAKs with a Class

Prologue Santa [1][2] was browsing the eTrade magazines on his iPad one morning and came across an article referenced in the latest O’Reilly Programming Newsletter about how ancient COBOL is the programming language still used for the bulk of the world’s business software. He had been aware of that since his huge operations with millionsContinue reading “Day 11: Santa Claus TWEAKs with a Class”

Day 9: Getting Windows Memory Usage with NativeCall

Raku NativeCalls provide a way to interact with dynamic libraries that follow the C calling convention and are very useful for obtaining information from the operating system, such as memory usage. In this article we will see how to get the memory usage from a Windows system. The MEMORYSTATUSEX C++ structure Win32 API provides theContinue reading “Day 9: Getting Windows Memory Usage with NativeCall”

Day 8: Raku web templating engines: boost up the parsing performance

Modern Raku web templating engines A templating engine basically provides tools for effective metadata interpolation inside static files (templates). At web application runtime, the engine parses and replaces variables with actual content values. Finally client gets a HTML page generated from the template, where all metadata (variables, statements, expressions) has been processed. Raku ecosystem hasContinue reading “Day 8: Raku web templating engines: boost up the parsing performance”

Day 6: Declarative APIs, easy peasy with Raku

Raku APIs tend to be easy to read, with named arguments alleviating the need to remember argument order in method calls, for example. But sometimes a library author goes above and beyond to produce extra nice, declarative APIs. One example is Cro, a framework for writing HTTP-based services, which allows you to write things likeContinue reading “Day 6: Declarative APIs, easy peasy with Raku”

Day 3: Literate Programming with Raku

Literate Programming with Raku Different programming language communities have differing cultures. Some are more pragmatic, others more idealistic. Some place great emphasis on having code be thoroughly readable and understandable for anyone who joins an existing project, and some prefer writing out clear and in-depth documentation. Raku, inheriting one of the best parts of Perl,Continue reading “Day 3: Literate Programming with Raku”

Day 1: Why Raku is the ideal language for Advent of Code

Now that it’s December, it’s time for two of my favorite traditions from the tech world: the Raku Advent Calendar and Advent of Code. These two holiday traditions have a fair amount in common – they both run from December 1 through Christmas, and both involve releasing something new every day during the event. Specifically,Continue reading “Day 1: Why Raku is the ideal language for Advent of Code”

RFC 168, by Johan Vromans: Built-in functions should be functions

Proposed on 27 August 2000, frozen on 20 September 2000, which was a generalization of RFC 26: Named operators versus functions proposed on 4 August 2000, frozen on 28 August 2000, also by Johan Vromans. Johan’s proposal was to completely obliterate the difference between built-in functions, such as abs, and functions defined by the user. In Perl, abs can beContinue reading “RFC 168, by Johan Vromans: Built-in functions should be functions”

Day 24: The Grinch of Raku, Part 2: Hold Your Horses

In 2017, the Grinch ruined Christmas by showing off some of the naughty things you can do with Raku’s features. Unfortunately, while his heart grew by three sizes that year, there’s more than one Grinch! This Grinch will be doing something extra naughty this year, taking some inspiration from the JavaScript community. You may haveContinue reading “Day 24: The Grinch of Raku, Part 2: Hold Your Horses”

Day 21: Searching for a Red gift

Alabaster Snowball, the elf, was searching for a gift for the person he had drawn on the North Pole’s Secret Santa. He had the great honour to draw Santa! What to give for the one who gives everyone’s presents? So he was searching on the internet for some keywords he knew Santa would like: automaticContinue reading “Day 21: Searching for a Red gift”