<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: habere-et-dispertire</title>
    <description>The latest articles on DEV Community by habere-et-dispertire (@habere-et-dispertire).</description>
    <link>https://dev.to/habere-et-dispertire</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1326191%2Fb06369f0-772a-46dc-9f3b-d2dcf07e1a15.png</url>
      <title>DEV Community: habere-et-dispertire</title>
      <link>https://dev.to/habere-et-dispertire</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/habere-et-dispertire"/>
    <language>en</language>
    <item>
      <title>Raku programmer spotted in the wild</title>
      <dc:creator>habere-et-dispertire</dc:creator>
      <pubDate>Sun, 19 Jan 2025 20:09:58 +0000</pubDate>
      <link>https://dev.to/habere-et-dispertire/raku-programmer-spotted-in-the-wild-p69</link>
      <guid>https://dev.to/habere-et-dispertire/raku-programmer-spotted-in-the-wild-p69</guid>
      <description>&lt;p&gt;They start so young — it must be all the `-oFun' !&lt;br&gt;
🤣🍦🤪🍭&lt;/p&gt;

</description>
      <category>rakulang</category>
    </item>
    <item>
      <title>Abuzz with FizzBuzz</title>
      <dc:creator>habere-et-dispertire</dc:creator>
      <pubDate>Sun, 10 Nov 2024 23:52:49 +0000</pubDate>
      <link>https://dev.to/habere-et-dispertire/abuzz-with-fizzbuzz-k1j</link>
      <guid>https://dev.to/habere-et-dispertire/abuzz-with-fizzbuzz-k1j</guid>
      <description>&lt;p&gt;zeekar asked about &lt;a href="https://redlib.zaggy.nl/r/rakulang/comments/1glwt7a/an_aplish_fizzbuzz_in_raku/" rel="noopener noreferrer"&gt;FizzBuzz ideas&lt;/a&gt; ( redlib.zaggy.nl ) in raku.&lt;/p&gt;

&lt;p&gt;¡ Exercism to the rescue ! The programming practice site has some seventy exercises to try in raku. One of particular interest here is the &lt;a href="https://exercism.org/tracks/raku/exercises/raindrops/" rel="noopener noreferrer"&gt;Raindrops exercise&lt;/a&gt; ( exercism.org ) — which is &lt;a href="https://en.wikipedia.org/wiki/Fizz_buzz" rel="noopener noreferrer"&gt;FizzBuzz&lt;/a&gt; ( en.wikipedia.org ) in disguise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caleb Miller's solution
&lt;/h2&gt;

&lt;p&gt;Paraphrasing &lt;a class="mentioned-user" href="https://dev.to/steffan153"&gt;@steffan153&lt;/a&gt; 's &lt;a href="https://exercism.org/tracks/raku/exercises/raindrops/solutions/Steffan153" rel="noopener noreferrer"&gt;concise solution&lt;/a&gt; ( exercism.org ) :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;say ([~] &amp;lt;Fizz Buzz&amp;gt; Zx $_ &amp;lt;&amp;lt;%%&amp;lt;&amp;lt; &amp;lt;3 5&amp;gt; or $_) for 1..100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The somewhat unintuitive magic here is that the string repetition operator &lt;code&gt;x&lt;/code&gt; can be used to repeat Fizz or Buzz "boolean times". 🧐&lt;/p&gt;

&lt;p&gt;¿ &lt;a href="https://docs.raku.org/language/operators.html#infix_x" rel="noopener noreferrer"&gt;What on earth&lt;/a&gt; ( docs.raku.org ) ?&lt;/p&gt;

&lt;p&gt;Raku happily &lt;a href="https://perldoc.perl.org/perlglossary#numification" rel="noopener noreferrer"&gt;numifies&lt;/a&gt; ( perldoc.perl.org ) the booleans to integers — &lt;code&gt;True&lt;/code&gt; becomes &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;False&lt;/code&gt; becomes &lt;code&gt;0&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+True, +False
# (1 0)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I remain in wonder at the thoughtful consideration of raku's edge-case handling. I didn't imagine that booleans would be cast to integer and so help in the reduction.&lt;/p&gt;

&lt;p&gt;Boundaries are an opportunity to experience growth but all too often elicit carelessness. I sense raku's mindful approach here as extending consideration beyond concern for the common case to include the common &lt;em&gt;edge-case&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The dance is joined when interplay and interrelatedness are akin to first-class citizens… and so I've come to describe raku not as a multi-paradigm language but as a synthesis or constellated language.&lt;/p&gt;

</description>
      <category>rakulang</category>
    </item>
  </channel>
</rss>
