<?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: hythm</title>
    <description>The latest articles on DEV Community by hythm (@hythm7).</description>
    <link>https://dev.to/hythm7</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%2F1078483%2Fbbf318fa-d1bf-4233-8030-c17c410ffa72.jpeg</url>
      <title>DEV Community: hythm</title>
      <link>https://dev.to/hythm7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hythm7"/>
    <language>en</language>
    <item>
      <title>Pakku Through Images</title>
      <dc:creator>hythm</dc:creator>
      <pubDate>Mon, 02 Oct 2023 05:01:16 +0000</pubDate>
      <link>https://dev.to/hythm7/pakku-through-images-3mec</link>
      <guid>https://dev.to/hythm7/pakku-through-images-3mec</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/hythm7/Pakku" rel="noopener noreferrer"&gt;Pakku&lt;/a&gt; is a package manager for the &lt;a href="https://raku.org/" rel="noopener noreferrer"&gt;Raku Programming Language&lt;/a&gt;. Latest releases of Pakku are part of Pakku &lt;code&gt;Celastrina&lt;/code&gt; version family. &lt;code&gt;Celastrina&lt;/code&gt; name means elegant and beutiful, So I will take the opportunity to introduce how elegant IMO Pakku handles Raku distributions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;br&gt;
Pakku uses unicode, emojis and colors quite a lot, This might not be everyone's cup of tea, or may be the terminal doesn't support them, so at the end of the post I will show how to disable or customize these features through configurations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install Pakku
&lt;/h3&gt;

&lt;p&gt;After clonning Pakku repository, one can run &lt;code&gt;raku -I. bin/pakku add .&lt;/code&gt; within the cloned repository to install Pakku:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frfinco3829g89xylm9qb.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frfinco3829g89xylm9qb.gif" alt="add pakku"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As shown Pakku installed successfully, and the default verbosity level &lt;code&gt;info&lt;/code&gt; was used, which shows the important information for installation steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Staging the distribution.&lt;/li&gt;
&lt;li&gt;Testing the distribution.&lt;/li&gt;
&lt;li&gt;List binaries installed to the system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If more information during installation is needed, one can raise the verbosity level.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install Raku Distribution
&lt;/h3&gt;

&lt;p&gt;To install Raku distribution one can run &lt;code&gt;pakku add MyDist&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk4loxjvlu5gpay2udazv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk4loxjvlu5gpay2udazv.gif" alt="add dist"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Raising the verbosity to level &lt;code&gt;now&lt;/code&gt; makes Pakku output what it is doing at the moment. As shown in the above image, Pakku keeps the user informed when Fetching the distribution, Compiling the distribution modules, also when running the individual tests. and the information flows seamlessly with the progress bar.&lt;/p&gt;

&lt;p&gt;More information can be viewed by setting the verbosity level to &lt;code&gt;debug&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There is also  &lt;code&gt;all&lt;/code&gt; verbosity level, which shows all possible information, including the tests output and much more informations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/hythm7/Pakku/actions/runs/6374897751/job/17300064088#step:5:1" rel="noopener noreferrer"&gt;here&lt;/a&gt; is an example of how it might look when run Pakku with &lt;code&gt;all&lt;/code&gt; verbosity level. That might look like a lot of information, but once get used to it, it looks familiar.&lt;/p&gt;

&lt;p&gt;Please disregard the &lt;code&gt;dont&lt;/code&gt; option in the above image, it basically means do all steps but don't commit any changes to the installation repositories. (equivalent to &lt;code&gt;dry-run&lt;/code&gt; in other programs).&lt;/p&gt;

&lt;h3&gt;
  
  
  Search Raku Distribution
&lt;/h3&gt;

&lt;p&gt;To search Raku distributions one can run &lt;code&gt;pakku search MyDist&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9pdkyva09nipkdi2vkr.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9pdkyva09nipkdi2vkr.gif" alt="search dist"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The search is relaxed by default, so many dists can be returned (search modules of dist as well), one can pass &lt;code&gt;norelaxed&lt;/code&gt; option to narrow the search.&lt;/p&gt;

&lt;p&gt;Also if one is interested in latest version only, &lt;code&gt;latest&lt;/code&gt; option can be passed to the &lt;code&gt;search&lt;/code&gt; command:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzbqkm43cnxy3qpmg029p.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzbqkm43cnxy3qpmg029p.gif" alt="search latest dist"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Pakku Configurations
&lt;/h3&gt;

&lt;p&gt;The configuration modules consist of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pakku general config module.&lt;/li&gt;
&lt;li&gt;A module for each Pakku command (eg. &lt;code&gt;add&lt;/code&gt;, &lt;code&gt;remove&lt;/code&gt;, &lt;code&gt;search&lt;/code&gt; etc.).&lt;/li&gt;
&lt;li&gt;Log module.&lt;/li&gt;
&lt;li&gt;Recommendation manager module.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To view the configs of a module, for instance pakku general configs module:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Forcom34c73kwk1podx4k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Forcom34c73kwk1podx4k.png" alt="config view"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To disbale colors, bar and spinner, one can run:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pakku config pakku disable pretty bar spinner&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Changing colors or replacing emojis with ascii characters can be done via the &lt;code&gt;config&lt;/code&gt; command as well, however I will make these changes directly in the config file as below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd8ldgoyv7v9xfsoxecjd.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd8ldgoyv7v9xfsoxecjd.gif" alt="config change"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here is how it looks after customization:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2btj29nkihyyx4aeiobv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2btj29nkihyyx4aeiobv.gif" alt="pakku customized"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To reset configuration:&lt;br&gt;
&lt;code&gt;pakku config reset&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To create a new config file:&lt;br&gt;
&lt;code&gt;pakku config new&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That's it for now, Thanks for viewing!&lt;/p&gt;

</description>
      <category>rakulang</category>
    </item>
    <item>
      <title>Pakku State Update</title>
      <dc:creator>hythm</dc:creator>
      <pubDate>Thu, 18 May 2023 18:19:01 +0000</pubDate>
      <link>https://dev.to/hythm7/pakku-state-update-16al</link>
      <guid>https://dev.to/hythm7/pakku-state-update-16al</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/hythm7/Pakku"&gt;Pakku&lt;/a&gt; is a package manager for the &lt;a href="https://raku.org/"&gt;Raku Programming Language&lt;/a&gt;. In this post I'm going to introduce two Pakku commands, &lt;code&gt;state&lt;/code&gt; and &lt;code&gt;update&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  state
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;state&lt;/code&gt; command gives an overview of the current state of installed distributions. eg. if there are missing dependencies, if a dist can be updated to a higher version or can be cleaned from the system. etc.&lt;/p&gt;

&lt;p&gt;To check the current state of installed Raku dists:&lt;/p&gt;

&lt;pre&gt;
&amp;gt; pakku state
1 - 🦋 STT: ｢...｣
2 - 🦋 UPD: ｢App::Rak:ver&amp;lt;0.2.17&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
3 - 🦋 UPD: ｢App::Rak:ver&amp;lt;0.2.16&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
4 - 🧚 STT: ｢App::Rak:ver&amp;lt;0.2.15&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
...
&lt;/pre&gt;

&lt;ol&gt;
&lt;li&gt;Reading current state, basically go through all installed dists and check if all deps are met, any updates available, etc.&lt;/li&gt;
&lt;li&gt;There is an update available for &lt;code&gt;App::Rak&lt;/code&gt; dist.&lt;/li&gt;
&lt;li&gt;Same as above but another version.&lt;/li&gt;
&lt;li&gt;The current state of installed &lt;code&gt;App::Rak&lt;/code&gt; dist is OK, no issues.&lt;/li&gt;
&lt;/ol&gt;

&lt;pre&gt;
🧚 STT: ｢Backtrace::Files:ver&amp;lt;0.0.3&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🧚 STT: ｢CLI::Version:ver&amp;lt;0.0.8&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🧚 STT: ｢Git::Files:ver&amp;lt;0.0.6&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🧚 STT: ｢IO::Path::AutoDecompress:ver&amp;lt;0.0.2&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
...
&lt;/pre&gt;

&lt;p&gt;The state of the above dists look fine, no issues, no updates available, no missing deps.&lt;/p&gt;

&lt;pre&gt;
🐞 DEP: ｢JSON::Fast:ver&amp;lt;0.17&amp;gt;:auth&amp;lt;cpan:TIMOTIMO&amp;gt;｣ missing!
🦗 STT: ｢JSON::Fast::Hyper:ver&amp;lt;0.0.3&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
...
&lt;/pre&gt;

&lt;p&gt;There is a dependency missing, basically &lt;code&gt;JSON::Fast::Hyper&lt;/code&gt; depends on &lt;code&gt;JSON::Fast&lt;/code&gt;, but &lt;code&gt;JSON::Fast&lt;/code&gt; is not installed. So state of &lt;code&gt;JSON::Fast::Hyper&lt;/code&gt; is not OK.&lt;/p&gt;

&lt;pre&gt;
🦋 UPD: ｢String::Utils:ver&amp;lt;0.0.21&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 UPD: ｢String::Utils:ver&amp;lt;0.0.20&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 UPD: ｢String::Utils:ver&amp;lt;0.0.19&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 UPD: ｢String::Utils:ver&amp;lt;0.0.18&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 UPD: ｢String::Utils:ver&amp;lt;0.0.17&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 UPD: ｢String::Utils:ver&amp;lt;0.0.16&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🧚 STT: ｢String::Utils:ver&amp;lt;0.0.15&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
...
&lt;/pre&gt;

&lt;p&gt;There  are multiple updates available for installed &lt;code&gt;String::Utils&lt;/code&gt; dist.&lt;/p&gt;

&lt;pre&gt;
1 - 🦋 UPD: ｢paths:ver&amp;lt;10.0.9&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
2 - 🧚 STT: ｢paths:ver&amp;lt;10.0.8&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
3 - 🦋 CLN: ｢paths:ver&amp;lt;10.0.8&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
4 - 🧚 STT: ｢paths:ver&amp;lt;10.0.9&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
5 - 🧚 STT: ｢rak:ver&amp;lt;0.0.47&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
...
&lt;/pre&gt;

&lt;ol&gt;
&lt;li&gt;There is an update available for &lt;code&gt;paths&lt;/code&gt; dist&lt;/li&gt;
&lt;li&gt;the current state of &lt;code&gt;paths:ver&amp;lt;10.0.8&amp;gt;&lt;/code&gt; dist is OK&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;paths:ver&amp;lt;10.0.8&amp;gt;&lt;/code&gt; dist can be cleand, this means there is a higher version already installed (which is evident by next line), and no other dists depend on it.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;paths:ver&amp;lt;10.0.9&amp;gt;&lt;/code&gt; dist state is OK&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rak&lt;/code&gt; dist state is OK&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now I have an overview of the current state of the system, and if more info needed, I can run in debug mode and see more information like, dist dependencies, reverse dependencies, etc.&lt;/p&gt;

&lt;p&gt;With this info I can install the missing deps or clean not needed dists. I also can update the system to get latest available versions, which what I'll do in the next section of this post.&lt;/p&gt;

&lt;h3&gt;
  
  
  update
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;update&lt;/code&gt; command is used for updating all installed dists or specific dist to latest available version.&lt;/p&gt;

&lt;p&gt;From previous section I found out that there are updates for &lt;code&gt;App::Rak&lt;/code&gt; and &lt;code&gt;String::Utils&lt;/code&gt; dists, there is also a missing dependency &lt;code&gt;JSON::Fast:ver&amp;lt;0.17&amp;gt;:auth&amp;lt;cpan:TIMOTIMO&amp;gt;&lt;/code&gt; and some dists can be cleaned.&lt;/p&gt;

&lt;p&gt;So time to run the &lt;code&gt;update&lt;/code&gt; command:&lt;/p&gt;

&lt;pre&gt;
&amp;gt; pakku update
...
🦋 STT: ｢...｣
🦋 UPD: ｢App::Rak:ver&amp;lt;0.2.17&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 UPD: ｢String::Utils:ver&amp;lt;0.0.21&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 UPD: ｢paths:ver&amp;lt;10.0.9&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
...
&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;update&lt;/code&gt; command starts by reading the current state, identify the updatable dists and resolve deps...&lt;/p&gt;

&lt;pre&gt;
🧚 TST: ｢JSON::Fast:ver&amp;lt;0.17&amp;gt;:auth&amp;lt;cpan:TIMOTIMO&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 STG: ｢App::Rak:ver&amp;lt;0.2.17&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 TST: ｢App::Rak:ver&amp;lt;0.2.17&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 TST: ｢01-basic.rakutest｣
🧚 TST: ｢App::Rak:ver&amp;lt;0.2.17&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 STG: ｢String::Utils:ver&amp;lt;0.0.21&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 TST: ｢String::Utils:ver&amp;lt;0.0.21&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 TST: ｢01-basic.rakutest｣
🦋 TST: ｢02-selective-importing.t｣
🧚 TST: ｢String::Utils:ver&amp;lt;0.0.21&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🧚 BIN: ｢rak｣
&lt;/pre&gt;

&lt;p&gt;Installed &lt;code&gt;JSON::Fast&lt;/code&gt; missing dep, updated &lt;code&gt;App::Rak&lt;/code&gt; and &lt;code&gt;String::Utils&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;
🦋 RMV: ｢App::Rak:ver&amp;lt;0.2.15&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt; paths:ver&amp;lt;10.0.8&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 RMV: ｢App::Rak:ver&amp;lt;0.2.15&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🦋 RMV: ｢paths:ver&amp;lt;10.0.8&amp;gt;:auth&amp;lt;zef:lizmat&amp;gt;:api&amp;lt;&amp;gt;｣
🧚 -Ofun
&lt;/pre&gt;

&lt;p&gt;Cleaning the not needed dists, the older versions of &lt;code&gt;App::Rak&lt;/code&gt; and &lt;code&gt;paths&lt;/code&gt;.&lt;br&gt;
One might notice that &lt;code&gt;String::Utils:ver&amp;lt;0.0.15&amp;gt;&lt;/code&gt; was not cleaned, and that is  because &lt;code&gt;App::Rak&lt;/code&gt; depends on that specific version.&lt;/p&gt;

&lt;p&gt;If one doesn't want to clean older versions of dists, &lt;code&gt;noclean&lt;/code&gt; option can be provided to &lt;code&gt;update&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>rakulang</category>
    </item>
    <item>
      <title>Unpacking Pakku</title>
      <dc:creator>hythm</dc:creator>
      <pubDate>Sun, 07 May 2023 17:43:55 +0000</pubDate>
      <link>https://dev.to/hythm7/unpacking-pakku-1mji</link>
      <guid>https://dev.to/hythm7/unpacking-pakku-1mji</guid>
      <description>&lt;p&gt;In this post I'm going to explain how I use &lt;a href="https://github.com/hythm7/Pakku"&gt;Pakku&lt;/a&gt; (a package manager for Raku) to manage Raku distributions. On a clean Rakudo installation, I will start with installing Pakku, then use some of the features like installing a distribution, search the ecosystem for a module and other features like configuring a local recommendation manager. and in the process I will explain how Pakku works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bootstrapping is easy
&lt;/h2&gt;

&lt;p&gt;The first thing I do on a new Rakudo installation is I install Pakku. all I need to do is clone the repo and ask Pakku to install Pakku!&lt;/p&gt;

&lt;pre&gt;
&amp;gt; git clone https://github.com/hythm7/Pakku.git
&amp;gt; cd Pakku
&amp;gt; raku -I. bin/pakku add .
🧚 PRC: ｢.｣
🦋 STG: ｢Pakku:ver&amp;lt;caria&amp;gt;:auth&amp;lt;github:hythm7&amp;gt;:api&amp;lt;0&amp;gt;｣
🦋 TST: ｢Pakku:ver&amp;lt;caria&amp;gt;:auth&amp;lt;github:hythm7&amp;gt;:api&amp;lt;0&amp;gt;｣
🦋 TST: ｢cache.rakutest｣
🦋 TST: ｢cmd.rakutest｣
🦋 TST: ｢config.rakutest｣
🦋 TST: ｢core.rakutest｣
🦋 TST: ｢log.rakutest｣
🦋 TST: ｢meta.rakutest｣
🦋 TST: ｢spec.rakutest｣
🧚 TST: ｢｢Pakku:ver&amp;lt;caria&amp;gt;:auth&amp;lt;github:hythm7&amp;gt;:api&amp;lt;0&amp;gt;｣
🧚 BIN: ｢pakku｣
🧚 -Ofun
&lt;/pre&gt;

&lt;p&gt;The output shows that Pakku distribution was staged, then test files were run, and also a binary &lt;code&gt;pakku&lt;/code&gt; was added. We will go through these different stages in "Installing a distribution" section later in this post.&lt;/p&gt;

&lt;p&gt;But for now looks like Pakku can install it self, thats nice. however, if one looked at the installation code will realize that the actual installation logic lives in Rakudo &lt;a href="https://github.com/rakudo/rakudo/blob/main/src/core.c/CompUnit/Repository/Installation.pm6#L220"&gt;here&lt;/a&gt;, and that what made bootstrapping Pakku easy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Searching for a module
&lt;/h2&gt;

&lt;p&gt;To search the ecosystems for a module, for instance a &lt;code&gt;DB&lt;/code&gt; module:&lt;/p&gt;

&lt;pre&gt;
&amp;gt; pakku search db
｢DB:ver&amp;lt;0.5&amp;gt;:auth&amp;lt;github:CurtTilmes&amp;gt;:api&amp;lt;1&amp;gt;｣
｢DB:ver&amp;lt;0.4&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB:ver&amp;lt;0.3&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB:ver&amp;lt;0.2&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB:ver&amp;lt;0.1&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB::Migration::Declare:ver&amp;lt;0.1.3&amp;gt;:auth&amp;lt;zef:jnthn&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB::Migration::Declare:ver&amp;lt;0.1.2&amp;gt;:auth&amp;lt;zef:jnthn&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB::Migration::Declare:ver&amp;lt;0.1.1&amp;gt;:auth&amp;lt;zef:jnthn&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB::Migration::Declare:ver&amp;lt;0.1&amp;gt;:auth&amp;lt;zef:jnthn&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB::Migration::Simple:ver&amp;lt;1.0&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB::Model::Easy:ver&amp;lt;*&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB::MySQL:ver&amp;lt;0.5&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
...
&lt;/pre&gt;

&lt;p&gt;The search is relaxed by default, but if exact match is needed, one can provide &lt;code&gt;norelaxed&lt;/code&gt; option:&lt;/p&gt;

&lt;pre&gt;
&amp;gt; pakku search norelaxed db
｢DB:ver&amp;lt;0.5&amp;gt;:auth&amp;lt;github:CurtTilmes&amp;gt;:api&amp;lt;1&amp;gt;｣
｢DB:ver&amp;lt;0.4&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB:ver&amp;lt;0.3&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB:ver&amp;lt;0.2&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
｢DB:ver&amp;lt;0.1&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
🧚 -Ofun

&lt;/pre&gt;

&lt;p&gt;One can check the details of a distribution, such as description, dependencies and what it provides. for example:&lt;/p&gt;

&lt;pre&gt;
&amp;gt; pakku search details 'DB::Migration::Declare:ver&amp;lt;0.1.3&amp;gt;'
MTA: ｢DB::Migration::Declare:ver&amp;lt;0.1.3&amp;gt;:auth&amp;lt;zef:jnthn&amp;gt;:api&amp;lt;&amp;gt;｣
DEP: ｢Digest::SHA1::Native｣
DEP: ｢Test::ContainerizedService｣
PRV: ｢DB::Migration::Declare｣
PRV: ｢DB::Migration::Declare::Applicator｣
PRV: ｢DB::Migration::Declare::ColumnType｣
PRV: ｢DB::Migration::Declare::Database｣
PRV: ｢DB::Migration::Declare::Database::Postgres｣
PRV: ｢DB::Migration::Declare::MigrationDirection｣
PRV: ｢DB::Migration::Declare::MigrationHistory｣
PRV: ｢DB::Migration::Declare::Model｣
PRV: ｢DB::Migration::Declare::Model::MigrationStep｣
PRV: ｢DB::Migration::Declare::Problem｣
PRV: ｢DB::Migration::Declare::SQLLiteral｣
PRV: ｢DB::Migration::Declare::Schema｣
PRV: ｢DB::Migration::Declare::Test｣
URL: ｢https://github.com/jnthn/db-migration-declare.git｣
DES: ｢Specify database migrations using a Raku DSL. Currently Postgres only.｣
🧚 -Ofun
&lt;/pre&gt;

&lt;h2&gt;
  
  
  Installing a distribution
&lt;/h2&gt;

&lt;p&gt;In this section I will install  &lt;code&gt;Inline::Perl5&lt;/code&gt; in debug mode enabled. because &lt;code&gt;Inline::Perl5&lt;/code&gt; has multiple dependencies (including bin dependency), and a build stage, I think it's a good candidate for this section.&lt;/p&gt;

&lt;p&gt;since running in debug mode, I will truncate the output as possible for easy readability, then explain the steps Pakku goes through for installing a distribution.&lt;/p&gt;

&lt;pre&gt;
&amp;gt; pakku verbose debug add Inline::Perl5
1 - 🧚 PRC: ｢Inline::Perl5｣
2 - 🐛 SPC: ｢Inline::Perl5｣
3 - 🐛 CAC: ｢Inline::Perl5｣ recommending...
4 - 🐛 REC: ｢pakku｣ ‹Inline::Perl5› recommending...
5 - 🦋 MTA: ｢Inline::Perl5:ver&amp;lt;0.60&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;｣
&lt;/pre&gt;

&lt;p&gt;1 - Started processing &lt;code&gt;Inline::Perl5&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;2 - Recieved &lt;code&gt;Inline::Perl5&lt;/code&gt; specification.&lt;/p&gt;

&lt;p&gt;3 - Asking the cache for a recommendation for &lt;code&gt;Inline::Perl5&lt;/code&gt; spec.&lt;/p&gt;

&lt;p&gt;4 - No recommendation from cache, so asking the default recommendation manager (named pakku).&lt;/p&gt;

&lt;p&gt;5 - &lt;code&gt;Inline::Perl5:ver&amp;lt;0.60&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;&lt;/code&gt; meta info recommended from the recommendation manager.&lt;/p&gt;

&lt;pre&gt;
🐛 SPC: ｢Distribution::Builder::MakeFromJSON:ver&amp;lt;0.6+&amp;gt;｣
🐛 CAC: ｢Distribution::Builder::MakeFromJSON:ver&amp;lt;0.6+&amp;gt;｣ recommending...
🐛 REC: ｢pakku｣ ‹Distribution::Builder::MakeFromJSON:ver&amp;lt;0.6+&amp;gt;› recommending...
🦋 MTA: ｢Distribution::Builder::MakeFromJSON:ver&amp;lt;0.6&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;｣
...
&lt;/pre&gt;

&lt;p&gt;The meta info is checked for dependencies, and run the same steps for found dependencies.&lt;/p&gt;

&lt;pre&gt;
🐛 SPC: ｢perl:from&amp;lt;bin&amp;gt;｣ satisfied!
🐛 SPC: ｢JSON::Fast｣ satisfied!
🐛 SPC: ｢Test｣ satisfied!
...
&lt;/pre&gt;

&lt;p&gt;Nothing will be done for any of these dependencies specs because they are already satisfied. Confirmed that &lt;code&gt;perl&lt;/code&gt; binary exists in the system. &lt;code&gt;JSON::Fast&lt;/code&gt; is already installed. &lt;code&gt;Test&lt;/code&gt; is already installed from rakudo core distribution.&lt;/p&gt;

&lt;pre&gt;
🦋 FTC: ｢Distribution::Builder::MakeFromJSON:ver&amp;lt;0.6&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;｣
🐛 CAC: ｢Distribution::Builder::MakeFromJSON:ver&amp;lt;0.6&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;｣ looking...
🐛 FTC: ｢http://truncated...｣
🐛 FTC: ｢/home/hythm/.pakku/.tmp/truncated...｣
🐛 CAC: ｢Distribution::Builder::MakeFromJSON:ver&amp;lt;0.6&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;｣ caching...
🐛 CAC: ｢Distribution::Builder::MakeFromJSON:ver&amp;lt;0.6&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;｣ ‹/home/hythm/.pakku/.cache/truncated...›
...
&lt;/pre&gt;

&lt;p&gt;Now as all dependencies have been resolved, it is time to fetch the distributions. so first, check if the distribution is in the cache, if not then fetch the archive, extract it to a temp directory, and cache it so it can be found in cache next time.&lt;/p&gt;

&lt;pre&gt;
...
1 - 🦋 BLD: ｢Inline::Perl5:ver&amp;lt;0.60&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;｣
2 - 🐛 BLD: ｢/home/hythm/.rakubrew/versions/moar-blead/install/bin/rakudo truncated...
3 - 🐛 BLD: gcc -Wall p5helper.c -Wl,-E  -fstack-protector-strong -L/usr/ truncated...
4 - 🧚 BLD: ｢Inline::Perl5:ver&amp;lt;0.60&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;｣
5 - 🦋 STG: ｢Inline::Perl5:ver&amp;lt;0.60&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;｣
6 - 🦋 TST: ｢Inline::Perl5:ver&amp;lt;0.60&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;｣
7 - ...
8 - 🧚 TST: ｢Inline::Perl5:ver&amp;lt;0.60&amp;gt;:auth&amp;lt;github:niner&amp;gt;:api&amp;lt;&amp;gt;｣
🧚 -Ofun
&lt;/pre&gt;

&lt;p&gt;Now as all distributions have been fetched, what is remaining is to build, stage, test and install them.&lt;/p&gt;

&lt;p&gt;1 - Start building&lt;/p&gt;

&lt;p&gt;2 - The running build command&lt;/p&gt;

&lt;p&gt;3 - The build process output&lt;/p&gt;

&lt;p&gt;4 - Build succeeded &lt;/p&gt;

&lt;p&gt;5 - Staging the distribution - installing the dist to a staging repository&lt;/p&gt;

&lt;p&gt;6 - Start testing the distribution using the staging repository.&lt;/p&gt;

&lt;p&gt;7 - The truncated output shows the files being tested and their output&lt;/p&gt;

&lt;p&gt;8 - Test succeeded&lt;/p&gt;

&lt;p&gt;After all dists have been tested successfully, the staging repository content is moved to the actuall installation repo finishing the installation process.&lt;/p&gt;

&lt;h2&gt;
  
  
  List installed dists
&lt;/h2&gt;

&lt;p&gt;To list all installed dists, one can run:&lt;/p&gt;

&lt;pre&gt;
&amp;gt; pakku list
｢Libarchive:ver&amp;lt;0.1&amp;gt;:auth&amp;lt;github:CurtTilmes&amp;gt;:api&amp;lt;&amp;gt;｣
｢Number::Bytes::Human:ver&amp;lt;0.0.3&amp;gt;:auth&amp;lt;&amp;gt;:api&amp;lt;&amp;gt;｣
｢JSON::OptIn:ver&amp;lt;0.0.2&amp;gt;:auth&amp;lt;zef:jonathanstowe&amp;gt;:api&amp;lt;&amp;gt;｣
｢Cro::Core:ver&amp;lt;0.8.9&amp;gt;:auth&amp;lt;zef:cro&amp;gt;:api&amp;lt;&amp;gt;｣
...
&lt;/pre&gt;

&lt;p&gt;To list installed dists in a specific repo, eg. &lt;code&gt;core&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;
&amp;gt; pakku list repo core
｢rakudo:ver&amp;lt;2023.04.45.g.5965.d.7.fb.0&amp;gt;:auth&amp;lt;Yet Another Society&amp;gt;:api&amp;lt;&amp;gt;｣
🧚 -Ofun
&lt;/pre&gt;

&lt;p&gt;To check if a dist is installed:&lt;/p&gt;

&lt;pre&gt;
&amp;gt; pakku list JSON::Fast
｢JSON::Fast:ver&amp;lt;0.17&amp;gt;:auth&amp;lt;cpan:TIMOTIMO&amp;gt;:api&amp;lt;&amp;gt;｣
🧚 -Ofun

&lt;/pre&gt;

&lt;h2&gt;
  
  
  Recommendation managers
&lt;/h2&gt;

&lt;p&gt;Pakku currently supports two types of recommendation managers:&lt;/p&gt;

&lt;p&gt;1- HTTP service recommendation manager&lt;/p&gt;

&lt;p&gt;Pakku ships configured with a default HTTP recman, that has all available Raku distriutions in &lt;a href="https://github.com/Raku/REA"&gt;Raku Ecosystem Archive&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can check the configured recommendation managers by running:&lt;/p&gt;

&lt;pre&gt;
&amp;gt; pakku config recman
🦋 CNF: ｢recman｣
[
  {
    "active": true,
    "location": "http://recman.pakku.org",
    "name": "pakku",
    "priority": 1
  }
]
🧚 -Ofun
&lt;/pre&gt;

&lt;p&gt;2- Local recommendation manager&lt;/p&gt;

&lt;p&gt;Used for making a recommendation manager from a local directory containing a collection of Raku dists, and these dists can be seen by Pakku and become available for installation. &lt;/p&gt;

&lt;p&gt;To configure a local recman one can run:&lt;/p&gt;

&lt;pre&gt;
&amp;gt; pakku config recman name-of-local-recman set location /home/hythm/dev/my-collection-of-raku-dists
🦋 CNF: ｢recman｣
🦋 REC: ｢name-of-local-recman｣
🦋 CNF: ｢{"location":"/home/hythm/dev/my-collection-of-raku-dists"}｣
🧚 -Ofun
&lt;/pre&gt;

&lt;p&gt;A local recman is a quick and easy way to turn a local collection of dists into a recman, but if one needs more managable way (eg manage dists internally in a company or an organization) it's advised to use an HTTP service recamn. in this case the HTTP service recman expects a collection of dist archives, and it will process them, build a database and can serve and recommend the dists. this can be acheived using &lt;a href="https://github.com/hythm7/recman-simple"&gt;recman-simple&lt;/a&gt; distribution.&lt;/p&gt;

&lt;p&gt;When multiple recmans are configured, it's advised to set the priority of each one as needed, because Pakku searches recmans based on priority, if nothing recommended from first recman, then search the next one.&lt;/p&gt;

&lt;p&gt;To set recman priority:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; pakku config recman name-of-local-recman set priority 2
🦋 CNF: ｢recman｣
🦋 REC: ｢name-of-local-recman｣
🦋 CNF: ｢{"priority":"2"}｣
🧚 -Ofun

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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