๐ŸŽ„ 6/25. Testing palindromic numbers in Perl 6

Welcome to Day 6 of the Perl 6 One-Liner Advent Calendar! As promised yesterday, today weโ€™ll be solving problem 4 of Project Euler. Let me once again remind you that you can pause reading and solve the problem yourself first. My intention is to demonstrate the beauty of Perl 6 and Perl in general. So, … Continue reading “๐ŸŽ„ 6/25. Testing palindromic numbers in Perl 6”

๐ŸŽ„ 5/25. Whatโ€™s the date today in Perl 6?

Welcome to Day 5 of this lovely Perl 6 One-Liner Advent Calendar! Today, weโ€™ll answer the question of whatโ€™s the date today (and tomorrow we can talk about palindromes if you want). So, to print the answer, you can use the following line of Perl 6 code: DateTime.now.yyyy-mm-dd.say It looks transparent and prints the date … Continue reading “๐ŸŽ„ 5/25. Whatโ€™s the date today in Perl 6?”

๐ŸŽ„ 4/25. Working with big numbers in Perl 6

Welcome to Day 4 of the Perl 6 One-Liner Advent Calendar! Today, weโ€™ll look at the Problem 13 of Project Euler. Let me show a screenshot of it: Indeed, it looks huge, and the task is to find the first ten digits of the sum of a hundred integers, each consisting of 50 digits. Sounds … Continue reading “๐ŸŽ„ 4/25. Working with big numbers in Perl 6”

๐ŸŽ„ 3/25. Generating random integers in Perl 6

Welcome to Day 3 of the Perl 6 One-Liner Advent Calendar! Today, we will generate random numbers. You may ask, whatโ€™s the deal with it, isnโ€™t it a routine task to call a kind of a rand function? Well, in some sense, yes, but in Perl 6, you might prefer calling a method.  Letโ€™s look at the … Continue reading “๐ŸŽ„ 3/25. Generating random integers in Perl 6”

๐ŸŽ„ 2/25. Grepping dividable numbers in Perl 6

Welcome to Day 2 of the Perl 6ย One-Liner Advent Calendar! Today, weโ€™ll solve a nice task from Project Euler with number 1. Once again, let me warn you that the rest of the text contains a solution, so you are welcome to make a pause to think of your own solution first. But I am … Continue reading “๐ŸŽ„ 2/25. Grepping dividable numbers in Perl 6”

๐ŸŽ„ 1/25. Generating random passwords in Perl 6

Welcome to the first day of the brand new Perl6.Online Advent Calendar! This year, its theme is Perl 6 One-Liners (a pun from perl6.onliners). Thus, welcome to this yearโ€™s Perl 6 One-Liner Advent Calendar. The whole perl6.online blog was initially planned to be daily, so itโ€™s a great opportunity to keep the pace for at least another … Continue reading “๐ŸŽ„ 1/25. Generating random passwords in Perl 6”