Results matching “Weekly challenge”

Coding with a full toolset

A few years ago, I created a talk (and later an entire class) about "transparadigm programming" in Raku.

The basic premise was that while some languages restrict you to only a single hammer (or worse: a box full of hammers), Raku was designed to be a complete toolkit: integrating OO, functional, concurrent, declarative, and procedural tools to allow you to choose exactly the right combination for each job.

That idea came back to me in ful…

Why I love Raku

and this week's first task was:

Write a script that finds the first square number that has at least 5 distinct digits.

The solution to that is (obviously!) to lazily square every number from 1 to infinity, then comb through each square's digits looking for five or more unique numerals, and immediately output the first such square you find.

Which translates directly to Raku:

1..∞…
  1 2

About Damian Conway

user-pic