Hey there, there’s another task #066-1 offered by the Perl Weekly Challenge (why still not mentioning Raku in the name?).
Integer-divide the two given integers, $m and $n, without using multiplication, or division, or modulo.
Science, Programming, Electronics, Languages
Hey there, there’s another task #066-1 offered by the Perl Weekly Challenge (why still not mentioning Raku in the name?).
Integer-divide the two given integers, $m and $n, without using multiplication, or division, or modulo.
Hey there, there’s another task #066-1 offered by the Perl Weekly Challenge (why still not mentioning Raku in the name?).
Integer-divide the two given integers, $m and $n, without using multiplication, or division, or modulo.
Here is my Raku solution of the Task 1 on Week 65. The task is to print all $n-digit numbers, whose sum of digits is $s.
Here is my Raku solution of the Task 1 on Week 65. The task is to print all $n-digit numbers, whose sum of digits is $s.
Let me demonstrate another interesting one-liner that I find to be a good addition to my last years’s book Raku One-Liners. The task was inspired by this week’s problem from the Perl Weekly Challenge.
Let me demonstrate another interesting one-liner that I find to be a good addition to my last years’s book Raku One-Liners. The task was inspired by this week’s problem from the Perl Weekly Challenge.
In this blog post, I am giving a number of examples of how you can use hashes in the Raku programming language in a correct and incorrect ways and explain how to avoid the chance to mislead yourself.
In this blog post, I am giving a number of examples of how you can use hashes in the Raku programming language in a correct and incorrect ways and explain how to avoid the chance to mislead yourself.
The answer is: Accessing array or hash items with a proper sigil!
The answer is: Accessing array or hash items with a proper sigil!
When working on preparing data for the covid.observer site, I discovered a couple of interesting findings, which I did not notice earlier or did not pay much attention to it.
When working on preparing data for the covid.observer site, I discovered a couple of interesting findings, which I did not notice earlier or did not pay much attention to it.
I’ve re-published a bunch of interviews that I took about five years ago: brian d foy Audrey Tang Flávio Glock Damian Conway Stevan Little Carl Mäsak Reini Urban There’s a couple of more, dating even earlier history. Maybe one day they will appear here too 🙂
Before the GitHub 02/02/2020 Archive program, I uploaded all my books published by DeepText to github.com/ash/books. I hope it will be frozen and archived for the future generations :-D.
Before the GitHub 02/02/2020 Archive program, I uploaded all my books published by DeepText to github.com/ash/books. I hope it will be frozen and archived for the future generations :-D.
Some time ago, I published an article about using NativeCall in Raku to call functions written in C. Today, let’s see how you can call simple functions written in C++ or in Fortran.
Some time ago, I published an article about using NativeCall in Raku to call functions written in C. Today, let’s see how you can call simple functions written in C++ or in Fortran.
I’d like to try how Raku can help in building a simple stack-oriented language.
I’d like to try how Raku can help in building a simple stack-oriented language.
About this ‘A Language a Day’ Advent Calendar This article became a part of my book ‘A Language a Day’, which you can get in both electronic and paper format. Languages covered in the book: C++, Clojure, Crystal, D, Dart, Elixir, Factor, Go, Hack, Hy, Io, Julia, Kotlin, Lua, Mercury, Nim, OCaml, Raku, Rust, Scala, and … Continue reading “Raku at a Glance — A Language a Day, Advent Calendar Day 11/24”
A few weeks ago, I submitted a booth request for promoting the Raku programming language at the next year’s FOSDEM in Brussels (1–2 February 2020). Just got a confirmation that the stand is accepted. More details of whether it is a 2-day stand or it is only there on Saturday or on Sunday, and where … Continue reading “The Raku stand at FOSDEM 2020”
Here’s a problem to solve: you have two threads, each incrementing the same single counter N times. What is the state of the counter at the end of the program? A straightforward solution A naïve C++ program can be written using the standard library threads like this: #include <iostream> #include <thread> int counter; void f() { for (int c = 0; c != 100000; c++) counter++; } int main() { std::thread thread_a {f}; … Continue reading “Concurrent atomic operations in C++ and Raku”
Let me announce the new book, Raku One-Liners. Electronic editionAmazon Kindle Paperback editionsAmazon.com, Amazon.de (and also on other local Amazon sites) The book is available in the PDF format for free. Paperback copies are available on Amazon. Download the Raku One-Liners book now N.B. As of today, the book is in the test mode, and … Continue reading “Raku One-Liners — a free book”
The cryptic title should not stop you from seeing bits of the regular Raku code. Namely, the two traits that you can add to function arguments: is rw and is raw. These two traits may look confusing because both allow changing the passed variable: sub f1($x is rw) { say $x; } sub f2($x is raw) { say $x; } my $a = 42; f1($a); # 42 f2($a); … Continue reading “🦋 110. is rw vs is raw in Raku”
Let me announce the second edition of my Using Perl 6 book. This time, it is published under the new name, Using Raku. Electronic editionLeanPubAmazon Kindle Paperback editionsAmazon.com, Amazon.de (and also on other local Amazon sites) The book is available in the PDF format for free. Paperback copies are available on Amazon. Download the Using Raku book … Continue reading “Using Raku — a free book”
So, Larry Wall agreed to rename Perl 6 to Raku. Here’s the quote with a nested quote in it: I am in favor of this change, because it reflects an ancient wisdom: “No one sews a patch of unshrunk cloth on an old garment, for the patch will pull away from the garment, making the … Continue reading “OK, Raku”
In short: I am against renaming. The longer story Once in a while, another round of the non-ending battle starts, and this time, unfortunately, I was the one who allowed to start it from a public stage. There were a lot of noise around the keynote speakers of PerlCon 2019 in Riga, and in the … Continue reading “On renaming Perl 6”
Create the interpreter for the Brainfuck language. Brainfuck is an esoteric programming language that has a small set of instructions, each of them a single punctuation character. It is assumed that the Brainfuck program has built-in data memory, which is an array of integers, and a pointer to the currently selected item. The two instructions, + … Continue reading “📘 The Brainfuck interpreter written in Perl 6”
Convert the Morse sequence to plain text. To save efforts in typing the decoding table, we can use the %code hash from Task 98, Text to Morse code, and create the ‘inversed’ hash, where the keys are the Morse sequences, and the values are letters or digits: my %char = %code.kv.reverse; Printing this variable shows its contents … Continue reading “📘 Converting Morse to text using Perl 6”