<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>RakuLang &amp;mdash; Swagg::Blogg</title>
    <link>https://blog.swagg.net/tag:RakuLang</link>
    <description>or: How I Learned to Stop Worrying and Love the WWW&lt;br&gt;&lt;a href=&#34;https://www.swagg.net&#34;&gt;Home&lt;/a&gt;&amp;nbsp;&lt;a href=&#34;https://blog.swagg.net/feed/&#34;&gt;RSS&lt;/a&gt;</description>
    <pubDate>Wed, 29 Apr 2026 13:39:38 +0000</pubDate>
    <image>
      <url>https://i.snap.as/gopN8vBC.png</url>
      <title>RakuLang &amp;mdash; Swagg::Blogg</title>
      <link>https://blog.swagg.net/tag:RakuLang</link>
    </image>
    <item>
      <title>Exploring DBIish</title>
      <link>https://blog.swagg.net/exploring-dbiish?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Previously I wrote that I need to plumb my web app to a DB and was told that DBIish was the tool for the job. I was glad to see it has a migrations module to go along with it. I&#39;ll go ahead and add my first migration which will create the table for a pastebin. These simply consist of SQL statements in a file I creatively named &#39;migrations&#39;:&#xA;&#xA;-- 1 up&#xA;CREATE TABLE IF NOT EXISTS pastes (&#xA;         pasteid SERIAL PRIMARY KEY,&#xA;       pastebody TEXT&#xA;       );&#xA;&#xA;-- 1 down&#xA;DROP TABLE pastes;&#xA;&#xA;Now I&#39;ll need to connect to my DB. I honestly didn&#39;t have time to figure out how I&#39;ll pass this object to my model module(s) so for now I&#39;m using a dynamic variable and rather than reading the credentials from a file I&#39;ll just use prompt() for now:&#xA;&#xA;my $dbh = DBIish.connect:&#xA;    &#39;Pg&#39;,&#xA;    :hostdevbussy.swagg.net,&#xA;    :databasepastesbin,&#xA;    :userpastesbin,&#xA;    password =  prompt &#39;enter DB password: &#39;;&#xA;&#xA;my $m = DB::Migration::Simple.new:&#xA;    :$dbh,&#xA;    :migration-filemigrations;&#xA;&#xA;$m.migrate: :version1;&#xA;&#xA;Now if we run the web app we get prompted for the DB password and then we can see the migration be applied:&#xA;&#xA;$ ./bin/pastes-bin&#xA;enter DB password: hogrider69&#xA;line: -- 1 up&#xA;version: 1, direction: up&#xA;line: CREATE TABLE IF NOT EXISTS pastes (&#xA;line:          pasteid SERIAL PRIMARY KEY,&#xA;line:        pastebody TEXT&#xA;line:        );&#xA;line: -- 1 down&#xA;version: 1, direction: down&#xA;line: DROP TABLE pastes;&#xA;initializing db-migrations-simple-meta&#xA;set initial version to 0&#xA;{1 =  {down =  DROP TABLE pastes;&#xA;, up =  CREATE TABLE IF NOT EXISTS pastes (&#xA;         pasteid SERIAL PRIMARY KEY,&#xA;       pastebody TEXT&#xA;       );&#xA;}}&#xA;migrating from version &#39;0&#39; to version &#39;1&#39;&#xA;True migrating &#39;up&#39; from version &#39;0&#39; to version &#39;1&#39;&#xA;doing &#39;up&#39; migrations for 1&#xA;executing CREATE TABLE IF NOT EXISTS pastes (&#xA;         pasteid SERIAL PRIMARY KEY,&#xA;       pastebody TEXT&#xA;       )&#xA;Humming-Bird listening on port http://localhost:3000&#xA;&#xA;We can check the DB now and see our new table applied along with the metadata for the migrations module itself:&#xA;&#xA;$ psql -h devbussy.swagg.net -U pastesbin&#xA;Password for user pastesbin: &#xA;psql (15.3 (Debian 15.3-0+deb12u1))&#xA;SSL connection (protocol: TLSv1.3, cipher: TLSAES256GCMSHA384, compression: off)&#xA;Type &#34;help&#34; for help.&#xA;&#xA;pastesbin=  \d&#xA;                     List of relations&#xA; Schema |           Name            |   Type   |   Owner    &#xA;--------+---------------------------+----------+------------&#xA; public | db-migrations-simple-meta | table    | pastesbin&#xA; public | pastes                    | table    | pastesbin&#xA; public | pastespasteidseq       | sequence | pastesbin&#xA;(3 rows)&#xA;&#xA;pastesbin=  \d pastes;&#xA;                                 Table &#34;public.pastes&#34;&#xA;   Column   |  Type   | Collation | Nullable |                 Default                  &#xA;------------+---------+-----------+----------+------------------------------------------&#xA; pasteid   | integer |           | not null | nextval(&#39;pastespasteidseq&#39;::regclass)&#xA; pastebody | text    |           |          | &#xA;Indexes:&#xA;    &#34;pastespkey&#34; PRIMARY KEY, btree (pasteid)&#xA;&#xA;Now I wanted to have separate model and controller modules but I&#39;m still working on how to pass $dbh around sanely so for now I&#39;m going to just add this to test:&#xA;&#xA;use Pastes-Bin::Model::Paste;&#xA;&#xA;No routes yet just prompt to &#39;fake it&#39;&#xA;my $new-paste = prompt &#39;enter a new paste: &#39;;&#xA;Pastes-Bin::Model::Paste.create: $new-paste;&#xA;&#xA;Here&#39;s the model code:&#xA;&#xA;unit class Pastes-Bin::Model::Paste;&#xA;&#xA;submethod create(Str $new-paste) {&#xA;    $dbh.execute(q:to/ENDSQL/, $new-paste)&#xA;        INSERT INTO pastes (pastebody)&#xA;        VALUES (?);&#xA;       ENDSQL&#xA;}&#xA;&#xA;And now we run it again:&#xA;&#xA;$ ./bin/pastes-bin &#xA;enter DB password: hogrider69&#xA;line: -- 1 up&#xA;version: 1, direction: up&#xA;line: CREATE TABLE IF NOT EXISTS pastes (&#xA;line:          pasteid SERIAL PRIMARY KEY,&#xA;line:        pastebody TEXT&#xA;line:        );&#xA;line: -- 1 down&#xA;version: 1, direction: down&#xA;line: DROP TABLE pastes;&#xA;current-version: allrows: [[1]]&#xA;{1 =  {down =  DROP TABLE pastes;&#xA;, up =  CREATE TABLE IF NOT EXISTS pastes (&#xA;         pasteid SERIAL PRIMARY KEY,&#xA;       pastebody TEXT&#xA;       );&#xA;}}&#xA;migrating from version &#39;1&#39; to version &#39;1&#39;&#xA;DB already at version 1&#xA;enter a new paste: testing 123...&#xA;Humming-Bird listening on port http://localhost:3000&#xA;^C&#xA;&#xA;And now in the DB:&#xA;&#xA;pastesbin=  SELECT  FROM pastes;&#xA; pasteid | pastebody &#xA;----------+------------&#xA;(0 rows)&#xA;&#xA;pastesbin=  SELECT  FROM pastes;&#xA; pasteid |   paste_body   &#xA;----------+----------------&#xA;        1 | testing 123...&#xA;(1 row)&#xA;&#xA;It&#39;s nice to see I can talk to a DB with ease with DBIish and it handles migrations. I need to next dig into how I can organize my code in Raku where $dbh can be &#39;passed around&#39;. I tried creating a separate controller module that calls the model class but in that configuration it did not see the $*dbh dynamic variable... If/when I figure that out then that&#39;ll be the next blog entry on my journey into Raku.&#xA;&#xA;webDev&#xA;noScript&#xA;RakuLang&#xA;&#xA;Homepage&#xD;&#xA;Code&#xD;&#xA;Mail&#xD;&#xA;Social&#xD;&#xA;Chat&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Previously I wrote that I need to plumb my web app to a DB and was told that <a href="https://raku.land/zef:raku-community-modules/DBIish">DBIish</a> was the tool for the job. I was glad to see it has a <a href="https://raku.land/zef:andinus/DB::Migration::Simple">migrations module</a> to go along with it. I&#39;ll go ahead and add my first migration which will create the table for a pastebin. These simply consist of SQL statements in a file I creatively named &#39;migrations&#39;:</p>

<pre><code>-- 1 up
CREATE TABLE IF NOT EXISTS pastes (
         paste_id SERIAL PRIMARY KEY,
       paste_body TEXT
       );

-- 1 down
DROP TABLE pastes;
</code></pre>

<p>Now I&#39;ll need to connect to my DB. I honestly didn&#39;t have time to figure out how I&#39;ll pass this object to my model module(s) so for now I&#39;m using a <a href="https://docs.raku.org/language/variables#The_*_twigil">dynamic variable</a> and rather than reading the credentials from a file I&#39;ll just use <code>prompt()</code> for now:</p>

<pre><code>my $*dbh = DBIish.connect:
    &#39;Pg&#39;,
    :host&lt;devbussy.swagg.net&gt;,
    :database&lt;pastes_bin&gt;,
    :user&lt;pastes_bin&gt;,
    password =&gt; prompt &#39;enter DB password: &#39;;

my $m = DB::Migration::Simple.new:
    :$*dbh,
    :migration-file&lt;migrations&gt;;

$m.migrate: :version&lt;1&gt;;
</code></pre>

<p>Now if we run the web app we get prompted for the DB password and then we can see the migration be applied:</p>

<pre><code>$ ./bin/pastes-bin
enter DB password: hogrider69
line: -- 1 up
version: 1, direction: up
line: CREATE TABLE IF NOT EXISTS pastes (
line:          paste_id SERIAL PRIMARY KEY,
line:        paste_body TEXT
line:        );
line: -- 1 down
version: 1, direction: down
line: DROP TABLE pastes;
initializing db-migrations-simple-meta
set initial version to 0
{1 =&gt; {down =&gt; DROP TABLE pastes;
, up =&gt; CREATE TABLE IF NOT EXISTS pastes (
         paste_id SERIAL PRIMARY KEY,
       paste_body TEXT
       );
}}
migrating from version &#39;0&#39; to version &#39;1&#39;
True migrating &#39;up&#39; from version &#39;0&#39; to version &#39;1&#39;
doing &#39;up&#39; migrations for 1
executing CREATE TABLE IF NOT EXISTS pastes (
         paste_id SERIAL PRIMARY KEY,
       paste_body TEXT
       )
Humming-Bird listening on port http://localhost:3000
</code></pre>

<p>We can check the DB now and see our new table applied along with the metadata for the migrations module itself:</p>

<pre><code>$ psql -h devbussy.swagg.net -U pastes_bin
Password for user pastes_bin: 
psql (15.3 (Debian 15.3-0+deb12u1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type &#34;help&#34; for help.

pastes_bin=&gt; \d
                     List of relations
 Schema |           Name            |   Type   |   Owner    
--------+---------------------------+----------+------------
 public | db-migrations-simple-meta | table    | pastes_bin
 public | pastes                    | table    | pastes_bin
 public | pastes_paste_id_seq       | sequence | pastes_bin
(3 rows)

pastes_bin=&gt; \d pastes;
                                 Table &#34;public.pastes&#34;
   Column   |  Type   | Collation | Nullable |                 Default                  
------------+---------+-----------+----------+------------------------------------------
 paste_id   | integer |           | not null | nextval(&#39;pastes_paste_id_seq&#39;::regclass)
 paste_body | text    |           |          | 
Indexes:
    &#34;pastes_pkey&#34; PRIMARY KEY, btree (paste_id)
</code></pre>

<p>Now I wanted to have separate model and controller modules but I&#39;m still working on how to pass <code>$dbh</code> around sanely so for now I&#39;m going to just add this to test:</p>

<pre><code>use Pastes-Bin::Model::Paste;

# No routes yet just prompt to &#39;fake it&#39;
my $new-paste = prompt &#39;enter a new paste: &#39;;
Pastes-Bin::Model::Paste.create: $new-paste;
</code></pre>

<p>Here&#39;s the model code:</p>

<pre><code>unit class Pastes-Bin::Model::Paste;

submethod create(Str $new-paste) {
    $*dbh.execute(q:to/END_SQL/, $new-paste)
        INSERT INTO pastes (paste_body)
        VALUES (?);
       END_SQL
}
</code></pre>

<p>And now we run it again:</p>

<pre><code>$ ./bin/pastes-bin 
enter DB password: hogrider69
line: -- 1 up
version: 1, direction: up
line: CREATE TABLE IF NOT EXISTS pastes (
line:          paste_id SERIAL PRIMARY KEY,
line:        paste_body TEXT
line:        );
line: -- 1 down
version: 1, direction: down
line: DROP TABLE pastes;
current-version: allrows: [[1]]
{1 =&gt; {down =&gt; DROP TABLE pastes;
, up =&gt; CREATE TABLE IF NOT EXISTS pastes (
         paste_id SERIAL PRIMARY KEY,
       paste_body TEXT
       );
}}
migrating from version &#39;1&#39; to version &#39;1&#39;
DB already at version 1
enter a new paste: testing 123...
Humming-Bird listening on port http://localhost:3000
^C
</code></pre>

<p>And now in the DB:</p>

<pre><code>pastes_bin=&gt; SELECT * FROM pastes;
 paste_id | paste_body 
----------+------------
(0 rows)

pastes_bin=&gt; SELECT * FROM pastes;
 paste_id |   paste_body   
----------+----------------
        1 | testing 123...
(1 row)
</code></pre>

<p>It&#39;s nice to see I can talk to a DB with ease with DBIish and it handles migrations. I need to next dig into how I can organize my code in Raku where <code>$dbh</code> can be &#39;passed around&#39;. I tried creating a separate controller module that calls the model class but in that configuration it did not see the <code>$*dbh</code> dynamic variable... If/when I figure that out then that&#39;ll be the next blog entry on my journey into Raku.</p>

<p><a href="https://blog.swagg.net/tag:webDev" class="hashtag"><span>#</span><span class="p-category">webDev</span></a>
<a href="https://blog.swagg.net/tag:noScript" class="hashtag"><span>#</span><span class="p-category">noScript</span></a>
<a href="https://blog.swagg.net/tag:RakuLang" class="hashtag"><span>#</span><span class="p-category">RakuLang</span></a></p>
<ul><li><a href="https://www.swagg.net">Homepage</a></li>
<li><a href="https://codeberg.org/swaggboi">Code</a></li>
<li><a href="mailto:swaggboi@slackware.uk">Mail</a></li>
<li><a href="https://eattherich.club/@swaggboi">Social</a></li>
<li><a href="https://discord.gg/6MXVZKU">Chat</a></li></ul>
]]></content:encoded>
      <guid>https://blog.swagg.net/exploring-dbiish</guid>
      <pubDate>Sun, 03 Dec 2023 04:28:38 +0000</pubDate>
    </item>
    <item>
      <title>Getting Started with Raku</title>
      <link>https://blog.swagg.net/getting-started-with-raku?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Now that my little textboard project is in a decent state I&#39;ve begun thinking about what I wanted to try next. I knew it&#39;ll be some sort of webbed site and there&#39;d be a database but other than that it was up in the air. Mojo.js appealed to me for obvious reasons but honestly I found the Node/JavaScript conventions and ecosystem pretty intimidating. I&#39;ve never been any good at JS and the whole front-end thing is an enigma to me, as is probably obvious if you&#39;ve seen my prior art.&#xA;&#xA;Thankfully I discovered Humming-Bird which I like because it reminds me of Mojo or Sinatra. It&#39;s also a great excuse to use Raku, a language I also find intimidating but at least feels more &#39;fun&#39; and less &#39;enterprise&#39; than JS or even Perl/Ruby. If you already have a nice little CPAN/Perl set-up then getting Raku is easy enough:&#xA;&#xA;cpanm App::Rakubrew &amp;&amp; rakubrew download&#xA;&#xA;If not then Debian ships it:&#xA;&#xA;apt install rakudo&#xA;&#xA;Finally we can use zef to install Humming-Bird:&#xA;&#xA;zef install Humming-Bird&#xA;&#xA;Humming-Bird is quite minimal like Sinatra is so I want to install something for templates. Template::Mustache was recommended to me after I had trouble getting others to work:&#xA;&#xA;zef install Template::Mustache&#xA;&#xA;To get started let&#39;s import Humming-Bird::Core and our template module; I&#39;m going to keep my template in a directory called templates:&#xA;&#xA;!/usr/bin/env raku&#xA;&#xA;use v6.d;&#xA;use Humming-Bird::Core;&#xA;use Template::Mustache;&#xA;&#xA;my $template = Template::Mustache.new: :from./templates;&#xA;&#xA;I&#39;ll go ahead and throw in a basic template named index.mustache:&#xA;&#xA;!DOCTYPE html&#xA;html&#xA;head&#xA;  title{{title}}/title&#xA;/head&#xA;body&#xA;h1{{title}}/h1&#xA;pWe will we will... RAKU!!/p&#xA;/body&#xA;/html&#xA;&#xA;To render this template we only need to add the following to our script, I&#39;ve named mine basic-site.raku if you&#39;re playing along at home:&#xA;&#xA;get &#39;/&#39;, -  $request, $response {&#xA;    my Str %stash = title =  &#39;Hello, web!&#39;;&#xA;&#xA;    $response.html($template.render: &#39;index&#39;, %stash);&#xA;};&#xA;&#xA;listen 3000;&#xA;&#xA;That is literally all you need to take flight:&#xA;&#xA;$ curl -i http://localhost:3000&#xA;HTTP/1.1 200 OK&#xA;Content-Length: 144&#xA;Date: Fri, 10 Nov 2023 02:29:44 +0000&#xA;X-Server: Humming-Bird (Raku)&#xA;content-type: text/html; charset=utf8&#xA;&#xA;!DOCTYPE html&#xA;html&#xA;head&#xA;  titleHello, web!/title&#xA;/head&#xA;body&#xA;h1Hello, web!/h1&#xA;pWe will we will... RAKU!!/p&#xA;/body&#xA;/html&#xA;&#xA;This is pretty decent as-is but if there&#39;s anything I create more than silly websites, it&#39;s compiler errors and warnings. I&#39;d like them to be more verbose so I can also add this:&#xA;&#xA;Add the &#39;middleware&#39; and &#39;advice&#39; parts&#xA;use Humming-Bird::Middleware;&#xA;use Humming-Bird::Advice;&#xA;&#xA;All you need to use &#39;em out-of-the-box&#xA;middleware &amp;middleware-logger;&#xA;advice     &amp;advice-logger;&#xA;&#xA;Our entire script now looks like this:&#xA;&#xA;!/usr/bin/env raku&#xA;&#xA;use v6.d;&#xA;use Humming-Bird::Core;&#xA;use Humming-Bird::Middleware;&#xA;use Humming-Bird::Advice;&#xA;use Template::Mustache;&#xA;&#xA;middleware &amp;middleware-logger;&#xA;advice     &amp;advice-logger;&#xA;&#xA;my $template = Template::Mustache.new: :from./templates;&#xA;&#xA;get &#39;/&#39;, -  $request, $response {&#xA;    my Str %stash = title =  &#39;Hello, web!&#39;;&#xA;&#xA;    $response.html($template.render: &#39;index&#39;, %stash);&#xA;};&#xA;&#xA;listen 3000;&#xA;&#xA;You can take a better look at it in my git repo along with my other Raku experiments so far. I&#39;m glad Humming-Bird arrived on the scene as it&#39;s left me with no more excuses to not at least try Raku and so far I&#39;m really diggin it. I&#39;ve found the best sources of Raku halp to be Reddit and their Discord (which is bridged to IRC as well); you can get your hyperlinks on their website.&#xA;&#xA;webDev&#xA;noScript&#xA;RakuLang&#xA;&#xA;Homepage&#xD;&#xA;Code&#xD;&#xA;Mail&#xD;&#xA;Social&#xD;&#xA;Chat&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Now that my little <a href="https://posttext.pl/about">textboard project</a> is in a decent state I&#39;ve begun thinking about what I wanted to try next. I knew it&#39;ll be some sort of webbed site and there&#39;d be a database but other than that it was up in the air. <a href="https://mojojs.org/">Mojo.js</a> appealed to me for obvious reasons but honestly I found the Node/JavaScript conventions and ecosystem pretty intimidating. I&#39;ve never been any good at JS and the whole front-end thing is an enigma to me, as is probably obvious if you&#39;ve seen my <a href="https://www.swagg.net/die">prior art</a>.</p>

<p>Thankfully I discovered <a href="https://github.com/rawleyfowler/Humming-Bird">Humming-Bird</a> which I like because it reminds me of <a href="https://mojolicious.org/">Mojo</a> or <a href="https://sinatrarb.com/">Sinatra</a>. It&#39;s also a great excuse to use <a href="https://raku.org/">Raku</a>, a language I also find intimidating but at least feels more &#39;fun&#39; and less &#39;enterprise&#39; than JS or even Perl/Ruby. If you already have a nice little CPAN/Perl set-up then getting Raku is easy enough:</p>

<pre><code>cpanm App::Rakubrew &amp;&amp; rakubrew download
</code></pre>

<p>If not then Debian ships it:</p>

<pre><code>apt install rakudo
</code></pre>

<p>Finally we can use <code>zef</code> to install Humming-Bird:</p>

<pre><code>zef install Humming-Bird
</code></pre>

<p>Humming-Bird is quite minimal like Sinatra is so I want to install something for templates. <a href="https://github.com/softmoth/raku-Template-Mustache">Template::Mustache</a> was recommended to me after I had trouble getting others to work:</p>

<pre><code>zef install Template::Mustache
</code></pre>

<p>To get started let&#39;s import <code>Humming-Bird::Core</code> and our template module; I&#39;m going to keep my template in a directory called <code>templates</code>:</p>

<pre><code>#!/usr/bin/env raku

use v6.d;
use Humming-Bird::Core;
use Template::Mustache;

my $template = Template::Mustache.new: :from&lt;./templates&gt;;
</code></pre>

<p>I&#39;ll go ahead and throw in a basic template named <code>index.mustache</code>:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;{{title}}&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;{{title}}&lt;/h1&gt;
&lt;p&gt;We will we will... RAKU!!&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>To render this template we only need to add the following to our script, I&#39;ve named mine <code>basic-site.raku</code> if you&#39;re playing along at home:</p>

<pre><code>get &#39;/&#39;, -&gt; $request, $response {
    my Str %stash = title =&gt; &#39;Hello, web!&#39;;

    $response.html($template.render: &#39;index&#39;, %stash);
};

listen 3000;
</code></pre>

<p>That is literally all you need to take flight:</p>

<pre><code>$ curl -i http://localhost:3000
HTTP/1.1 200 OK
Content-Length: 144
Date: Fri, 10 Nov 2023 02:29:44 +0000
X-Server: Humming-Bird (Raku)
content-type: text/html; charset=utf8

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Hello, web!&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Hello, web!&lt;/h1&gt;
&lt;p&gt;We will we will... RAKU!!&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>This is pretty decent as-is but if there&#39;s anything I create more than silly websites, it&#39;s compiler errors and warnings. I&#39;d like them to be more verbose so I can also add this:</p>

<pre><code># Add the &#39;middleware&#39; and &#39;advice&#39; parts
use Humming-Bird::Middleware;
use Humming-Bird::Advice;

# All you need to use &#39;em out-of-the-box
middleware &amp;middleware-logger;
advice     &amp;advice-logger;
</code></pre>

<p>Our entire script now looks like this:</p>

<pre><code>#!/usr/bin/env raku

use v6.d;
use Humming-Bird::Core;
use Humming-Bird::Middleware;
use Humming-Bird::Advice;
use Template::Mustache;

middleware &amp;middleware-logger;
advice     &amp;advice-logger;

my $template = Template::Mustache.new: :from&lt;./templates&gt;;

get &#39;/&#39;, -&gt; $request, $response {
    my Str %stash = title =&gt; &#39;Hello, web!&#39;;

    $response.html($template.render: &#39;index&#39;, %stash);
};

listen 3000;
</code></pre>

<p>You can take a better look at it in my <a href="https://git.minimally.online/swaggboi/Mind-Fuck/src/branch/main/basic-site">git repo</a> along with my other Raku experiments so far. I&#39;m glad Humming-Bird <a href="https://www.reddit.com/r/rakulang/comments/17qbjj2/introducing_hummingbird_version_3/">arrived on the scene</a> as it&#39;s left me with no more excuses to not at least try Raku and so far I&#39;m really diggin it. I&#39;ve found the best sources of Raku halp to be Reddit and their Discord (which is bridged to IRC as well); you can get your hyperlinks <a href="https://raku.org/community/">on their website</a>.</p>

<p><a href="https://blog.swagg.net/tag:webDev" class="hashtag"><span>#</span><span class="p-category">webDev</span></a>
<a href="https://blog.swagg.net/tag:noScript" class="hashtag"><span>#</span><span class="p-category">noScript</span></a>
<a href="https://blog.swagg.net/tag:RakuLang" class="hashtag"><span>#</span><span class="p-category">RakuLang</span></a></p>
<ul><li><a href="https://www.swagg.net">Homepage</a></li>
<li><a href="https://codeberg.org/swaggboi">Code</a></li>
<li><a href="mailto:swaggboi@slackware.uk">Mail</a></li>
<li><a href="https://eattherich.club/@swaggboi">Social</a></li>
<li><a href="https://discord.gg/6MXVZKU">Chat</a></li></ul>
]]></content:encoded>
      <guid>https://blog.swagg.net/getting-started-with-raku</guid>
      <pubDate>Fri, 10 Nov 2023 02:53:11 +0000</pubDate>
    </item>
  </channel>
</rss>