<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Duckpuck</title>
    <subtitle>A piece of internet that helps me keep track of my projects, my thoughts about them and their current states.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://duckpuck.net/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://duckpuck.net"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2024-11-15T00:00:00+00:00</updated>
    <id>https://duckpuck.net/atom.xml</id>
    <entry xml:lang="en">
        <title>Spectrogram</title>
        <published>2024-11-15T00:00:00+00:00</published>
        <updated>2024-11-15T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/spectrogram/"/>
        <id>https://duckpuck.net/projects/spectrogram/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/spectrogram/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;spectrogram.png&quot; alt=&quot;spectrogram ui&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h2 id=&quot;what-s-this-project&quot;&gt;What&#x27;s this project&lt;&#x2F;h2&gt;
&lt;p&gt;This is a GUI tool to create a &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Spectrogram&quot;&gt;spectrogram&lt;&#x2F;a&gt; from a wav file. The core library is &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;psiphi75&#x2F;sonogram&#x2F;&quot;&gt;sonogram&lt;&#x2F;a&gt;.
The GUI library is &lt;a href=&quot;https:&#x2F;&#x2F;iced.rs&#x2F;&quot;&gt;iced&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;You can choose to export the spectogram as png or csv, choose among multiple color theme.&lt;&#x2F;p&gt;
&lt;p&gt;Example of spectogram created by this program:&lt;&#x2F;p&gt;

&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;spectrogram_example.png&quot; alt=&quot;spectrogram example&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Logseq time tracking</title>
        <published>2024-10-01T00:00:00+00:00</published>
        <updated>2024-10-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/notes/logseq-time-tracking/"/>
        <id>https://duckpuck.net/notes/logseq-time-tracking/</id>
        
        <content type="html" xml:base="https://duckpuck.net/notes/logseq-time-tracking/">&lt;h2 id=&quot;setup&quot;&gt;Setup&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;template-creation&quot;&gt;Template creation&lt;&#x2F;h3&gt;
&lt;p&gt;I like to organize my templates in a dedicated page so the first step is to create a template page. Inside we can add the following two templates:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Time tracking entry&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;- Time tracking entry
&lt;&#x2F;span&gt;&lt;span&gt;  template:: time tracking entry
&lt;&#x2F;span&gt;&lt;span&gt;  template-including-parent:: false
&lt;&#x2F;span&gt;&lt;span&gt;	- date:: &amp;lt;%today%&amp;gt;
&lt;&#x2F;span&gt;&lt;span&gt;	  hours:: 1
&lt;&#x2F;span&gt;&lt;span&gt;	  type:: timetracking
&lt;&#x2F;span&gt;&lt;span&gt;	  project::
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Time tracking overview&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;- Time tracking overview
&lt;&#x2F;span&gt;&lt;span&gt;  template:: time tracking overview
&lt;&#x2F;span&gt;&lt;span&gt;  template-including-parent:: false
&lt;&#x2F;span&gt;&lt;span&gt;  collapsed:: true
&lt;&#x2F;span&gt;&lt;span&gt;	- query-table:: true
&lt;&#x2F;span&gt;&lt;span&gt;	  query-sort-by:: block
&lt;&#x2F;span&gt;&lt;span&gt;	  query-sort-desc:: true
&lt;&#x2F;span&gt;&lt;span&gt;	  query-properties:: [:block :page]
&lt;&#x2F;span&gt;&lt;span&gt;	  #+BEGIN_QUERY
&lt;&#x2F;span&gt;&lt;span&gt;	  {:title [:h2 &amp;quot;Time tracking&amp;quot;]
&lt;&#x2F;span&gt;&lt;span&gt;	   :query [:find (pull ?b [*])
&lt;&#x2F;span&gt;&lt;span&gt;	         :in $ ?current-page
&lt;&#x2F;span&gt;&lt;span&gt;	         :where
&lt;&#x2F;span&gt;&lt;span&gt;	         (property ?b :type &amp;quot;timetracking&amp;quot;)
&lt;&#x2F;span&gt;&lt;span&gt;	         [?p :block&#x2F;name ?current-page]
&lt;&#x2F;span&gt;&lt;span&gt;	         [?b :block&#x2F;refs ?p]]
&lt;&#x2F;span&gt;&lt;span&gt;	   :inputs [:current-page]}
&lt;&#x2F;span&gt;&lt;span&gt;	  #+END_QUERY
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Once added to the page I add them as Template (right click on the block bullet then &lt;code&gt;Make a Template&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
&lt;h3 id=&quot;creation-of-the-project-page&quot;&gt;Creation of the project page&lt;&#x2F;h3&gt;
&lt;p&gt;This is just an empty page I&#x27;m creating for the project needing time tracking.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;create-time-tracking-page&quot;&gt;Create time_tracking page&lt;&#x2F;h3&gt;
&lt;p&gt;Again for now an empty page, this will later contains the log of hours tracked.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-to-use-it&quot;&gt;How to use it&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;log-hours&quot;&gt;Log hours&lt;&#x2F;h3&gt;
&lt;p&gt;Now that everything is setup I simply add now entry in the time_tracking page using the &lt;code&gt;&#x2F;template&lt;&#x2F;code&gt; command and use the Time tracking entry template. Once added I adjust date and hours as needed and take make project I want to tracking time for.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;overview-of-logged-hours&quot;&gt;Overview of logged hours&lt;&#x2F;h3&gt;
&lt;p&gt;In the project page I then using the Time tracking overview template again using the &lt;code&gt;&#x2F;template&lt;&#x2F;code&gt; command.&lt;&#x2F;p&gt;
&lt;p&gt;Here I don&#x27;t have to change the content of the block but I like to display the list as table buy clicking on the table icon right of the block title and hiding the block and page attribute (the visibility toggles can be access by clicking the cogwheel icon right of the block title).&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Instax mini evo</title>
        <published>2023-11-14T00:00:00+00:00</published>
        <updated>2023-11-14T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/notes/instax-mini-evo/"/>
        <id>https://duckpuck.net/notes/instax-mini-evo/</id>
        
        <content type="html" xml:base="https://duckpuck.net/notes/instax-mini-evo/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;instax_mini_evo.gif&quot; alt=&quot;animated tuto for using an instax mini evo&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h2 id=&quot;tuto&quot;&gt;Tuto&lt;&#x2F;h2&gt;
&lt;p&gt;The Instax mini evo is relatively easy to use compared to many cameras. Yet for folks that aren&#x27;t use to take pictures with camera some of the features from this one could be overlooked.&lt;&#x2F;p&gt;
&lt;p&gt;This small pixel art tuto was created for an event to show all the guest how to use this camera, I figured it woul not hurt to have it on this website.&lt;&#x2F;p&gt;
&lt;p&gt;
&lt;div class=&quot;image&quot;&gt;
    &lt;div class=&quot;left&quot;&gt;
        &lt;h3&gt;Step 1 - Power on&lt;&#x2F;h3&gt;
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;right&quot;&gt;
        &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;instax_mini_evo_step_1.png&quot; alt=&quot;power on instax mini evo&quot; &#x2F;&gt;
    &lt;&#x2F;div&gt;
&lt;&#x2F;div&gt;


&lt;div class=&quot;image&quot;&gt;
    &lt;div class=&quot;left&quot;&gt;
        &lt;h3&gt;Step 2 - Choose filter&lt;&#x2F;h3&gt;
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;right&quot;&gt;
        &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;instax_mini_evo_step_2.png&quot; alt=&quot;choose filter on instax mini evo&quot; &#x2F;&gt;
    &lt;&#x2F;div&gt;
&lt;&#x2F;div&gt;


&lt;div class=&quot;image&quot;&gt;
    &lt;div class=&quot;left&quot;&gt;
        &lt;h3&gt;Step 3 - Choose effect&lt;&#x2F;h3&gt;
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;right&quot;&gt;
        &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;instax_mini_evo_step_3.png&quot; alt=&quot;choose effect on instax mini evo&quot; &#x2F;&gt;
    &lt;&#x2F;div&gt;
&lt;&#x2F;div&gt;


&lt;div class=&quot;image&quot;&gt;
    &lt;div class=&quot;left&quot;&gt;
        &lt;h3&gt;Step 4 - Snap it&lt;&#x2F;h3&gt;
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;right&quot;&gt;
        &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;instax_mini_evo_step_4.png&quot; alt=&quot;take picture with an instax mini evo&quot; &#x2F;&gt;
    &lt;&#x2F;div&gt;
&lt;&#x2F;div&gt;


&lt;div class=&quot;image&quot;&gt;
    &lt;div class=&quot;left&quot;&gt;
        &lt;h3&gt;Step 5 - Print it&lt;&#x2F;h3&gt;
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;right&quot;&gt;
        &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;instax_mini_evo_step_5.png&quot; alt=&quot;print a picture on instax mini evo&quot; &#x2F;&gt;
    &lt;&#x2F;div&gt;
&lt;&#x2F;div&gt;
&lt;&#x2F;p&gt;
&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;&#x2F;h2&gt;
&lt;p&gt;The pixel art are created in a software call &lt;a href=&quot;https:&#x2F;&#x2F;www.aseprite.org&#x2F;&quot;&gt;aseprite&lt;&#x2F;a&gt;, the sources files for this project are available in the meta links at the top of this page.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Dithor</title>
        <published>2022-11-18T00:00:00+00:00</published>
        <updated>2022-11-18T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/dithor/"/>
        <id>https://duckpuck.net/projects/dithor/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/dithor/">&lt;h2 id=&quot;what-is-this-library&quot;&gt;What is this library&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;basic-principles&quot;&gt;Basic principles&lt;&#x2F;h3&gt;
&lt;p&gt;This library rewrite an image given as input using only two colors a la &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dither&quot;&gt;dithering&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The image is spit in many squares of 5x5 pixels for high resolution mode, or 15x15 pixels for low resolution mode. For each of those squares the average &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Relative_luminance&quot;&gt;relative luminance&lt;&#x2F;a&gt; is calculated.&lt;&#x2F;p&gt;
&lt;p&gt;This luminance is then used to assign a level to the square. The level is between 0 and 9, 0 for completely bright and 9 fully dark.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;high-resolution&quot;&gt;High resolution&lt;&#x2F;h4&gt;
&lt;p&gt;The content of the square is then filled with the following pattern (depending on the level):&lt;&#x2F;p&gt;

&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;dithor_gradiant.png&quot; alt=&quot;dithor gradiant for levels&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;Here&#x27;s a picture showing the same patterns on a bigger surface:&lt;&#x2F;p&gt;

&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;dithor_pattern.png&quot; alt=&quot;dithor gradiant big surface&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;Finally here&#x27;s an example using the painting &quot;The swan, no 1&quot; from Hilma af Klint:&lt;&#x2F;p&gt;

&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;dithor_example.png&quot; alt=&quot;dithor version of the swan&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h4 id=&quot;low-resolution&quot;&gt;Low resolution&lt;&#x2F;h4&gt;
&lt;p&gt;The content of the square is then filled with the following pattern (depending on the level):&lt;&#x2F;p&gt;

&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;dithor_gradiant_low_res.png&quot; alt=&quot;dithor gradiant for level&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;And here&#x27;s the same example in low res:&lt;&#x2F;p&gt;

&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;dithor_example_low_res.png&quot; alt=&quot;dithor version of the swan in low res&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;using-colors&quot;&gt;Using colors&lt;&#x2F;h3&gt;
&lt;p&gt;When the third parameter is true the output will be in color, the brightest and darkest colors from the 25 or 225 pixels are used to fill the patterns showed above.&lt;&#x2F;p&gt;
&lt;p&gt;Example in high res:&lt;&#x2F;p&gt;

&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;dithor_example_colors.png&quot; alt=&quot;dithor version of the swan in colors&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;Example in low res:&lt;&#x2F;p&gt;

&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;dithor_example_low_res_colors.png&quot; alt=&quot;dithor version of the swan in colors and low res&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h2 id=&quot;how-to-use-it&quot;&gt;How to use it&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;dithor&quot;&gt;Crate.io&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;To use this library you can simply call it using:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;dithor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;dithor(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.jpg&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output.jpg&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Params&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;input: path to the input image, can be a jpg or png&lt;&#x2F;li&gt;
&lt;li&gt;output: path to the output image, can be a jpg or png. If the file already exists it will be overwritten&lt;&#x2F;li&gt;
&lt;li&gt;overwrite: specify if the output file should overwrite any existing image with the same name&lt;&#x2F;li&gt;
&lt;li&gt;color: boolean, if true the output image will be in color otherwhise it will be in black and white&lt;&#x2F;li&gt;
&lt;li&gt;high_res: boolean, if true will dither 5x5 pixels if false dither 15x15 pixels&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Berlin guide</title>
        <published>2022-10-23T00:00:00+00:00</published>
        <updated>2022-10-23T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/notes/berlin/"/>
        <id>https://duckpuck.net/notes/berlin/</id>
        
        <content type="html" xml:base="https://duckpuck.net/notes/berlin/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;berlin.jpg&quot; alt=&quot;glitched picture of Berlin&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h2 id=&quot;tips&quot;&gt;Tips&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Always have a bit of cash on you, a lot of shops in Berlin don’t accept the card.&lt;&#x2F;li&gt;
&lt;li&gt;Convenience stores are called Späti, they are everywhere and usually open late. It’s common for them to have some tables in front for people to enjoy a drink.&lt;&#x2F;li&gt;
&lt;li&gt;Shops are closed on Sundays in Germany.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;food&quot;&gt;Food&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;vegan-only-restaurants&quot;&gt;Vegan only restaurants&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;4682864191&quot;&gt;1990 Vegans&lt;&#x2F;a&gt;: Thai street food tapas, my favorite restaurant in Berlin, even if you aren&#x27;t vegan I highly recommend you to try it.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;6552674824&quot;&gt;Secret Garden&lt;&#x2F;a&gt;: Vegan sushi, the restaurant itself is on top of a vegan supermarket and in front of a vegan shoe shop.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;6907089651&quot;&gt;Element Five&lt;&#x2F;a&gt;: Same kind of restaurant as 1990 vegans, I would say not nearly as good but there&#x27;s fewer people so it&#x27;s easier to get a table.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;vegetarian-vegan-options&quot;&gt;Vegetarian &amp;amp; Vegan options&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;2796753232&quot;&gt;Curry 61&lt;&#x2F;a&gt;: to try the famous &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Currywurst&quot;&gt;Currywurst&lt;&#x2F;a&gt;, the sauce is excellent and they have a good vegan option.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;6435179523&quot;&gt;Shakespeare and Sons&lt;&#x2F;a&gt;: Great boiled bagels and also a nice English bookshop.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;3216719426&quot;&gt;Goldies&lt;&#x2F;a&gt;: Fries with topping, perfect comfort food.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;6978892023&quot;&gt;Chungking noodles&lt;&#x2F;a&gt;: Delicious Chongqing noodles with a lot of Sichuan pepper, you might queue a bit but there&#x27;s a späti just next door with cold beers.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;697751131&quot;&gt;Wen cheng&lt;&#x2F;a&gt;: Biang Biang noodles (they are very thick), you will probably queue a lot but it&#x27;s worth it.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;1165969879&quot;&gt;Kimchi princess&lt;&#x2F;a&gt;: Korean restaurant with delicious bibimbap.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;snacks&quot;&gt;Snacks&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;6353110784&quot;&gt;Duo&lt;&#x2F;a&gt; Sicilian ice cream, with various flavors. Perfect for hot days.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;6652933076&quot;&gt;Codos&lt;&#x2F;a&gt; If you want something nasty I recommand the cruffin, a mix of croissant and muffin. The coffee is also delicious.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;beers-and-cocktails&quot;&gt;Beers and cocktails&lt;&#x2F;h2&gt;
&lt;p&gt;In Berlin like everywhere in Germany there&#x27;s a big choice of delicious beers, don&#x27;t be shocked to see someone opening a beer in the s-bhan after leaving their workplace. To my knowledge, Berlin has two main kinds:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Pilsner: Despite what everyone born in Berlin will say to you this kind of beer is bland, it&#x27;s great for quenching your thirst but that&#x27;s about it. The two main brands are Berliner Pilsner and Berliner Kindle. They taste the same yet everyone born in Berlin prefers one or the other (often depending in which part of Berlin they are from).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Berliner_Weisse&quot;&gt;Berliner weisse&lt;&#x2F;a&gt;: This one is a bit more interesting, it&#x27;s a very old and sour beer. When you usually order it in a bar you will get it served with a sirup but it isn&#x27;t so good. Recently sour beers are trendy again, which means that microbreweries produce great Berliner Weisse that you can enjoy without the sirup the ones from Brlo and Berliner Berg are great examples.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;There&#x27;s also Radlers which is a Pilsner mixed with citrus fruit soda, it&#x27;s refreshing and low in alcohol so perfect for hot days.&lt;&#x2F;p&gt;
&lt;p&gt;You can of course also enjoy beers from other parts of Germany, the most common being:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Weizenbier&#x2F;Hefeweizen: Wheat beer served in high glasses, personally I like Franziskaner the best.&lt;&#x2F;li&gt;
&lt;li&gt;Helles: Light lager, my recommendation if you don&#x27;t know what to drink. Augustiner is my go-to beer.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Gose&quot;&gt;Gose&lt;&#x2F;a&gt;: Another old and sour beer that has its origin in Goslar.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;beer-shops&quot;&gt;Beer shops&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;282406641&quot;&gt;Drink Oase&lt;&#x2F;a&gt;: a späti with a large choice of beers.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;6041857820&quot;&gt;Bierladen&lt;&#x2F;a&gt;: same but in another kiez.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;4034138661#map=19&#x2F;52.50054&#x2F;13.42239&quot;&gt;Biererei&lt;&#x2F;a&gt;: Great place for fancy beers but fuck it&#x27;s expensive, they also have a bar in the same street, also very expensive.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;bars-breweries&quot;&gt;Bars &amp;amp; Breweries&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;4367758889&quot;&gt;BRLO Brewhouse&lt;&#x2F;a&gt;: Berliner microbrewery, their biergarten is the perfect sunny evenings hangout place.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;way&#x2F;25003253&quot;&gt;Hofbräu Berlin&lt;&#x2F;a&gt;: A big and ugly building opened by a Brewery from Munich, it&#x27;s touristy but still interesting for the atmosphere, especially in the evening when it&#x27;s full and people are dancing in front of the live folkloric band.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;way&#x2F;763964269&quot;&gt;Holzmarkt&lt;&#x2F;a&gt;: A hangout place alongside the Spree.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;2296975568&quot;&gt;Herman belgian bar&lt;&#x2F;a&gt;: Good selection of Belgian beers.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;5022231323&quot;&gt;Mikkeller&lt;&#x2F;a&gt;: A Danish brewery offering lots of fancy beers.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;cocktails-bars&quot;&gt;Cocktails bars&lt;&#x2F;h2&gt;
&lt;p&gt;Those are my three favorite cocktails bars, sorted by my most favorite to my lest favorite&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;1295218968&quot;&gt;Feger&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;558494289&quot;&gt;Celo Privat Bar&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;3215985261&quot;&gt;Apothekenbar&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;museums&quot;&gt;Museums&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;art-exhibition&quot;&gt;Art &amp;amp; Exhibition&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;way&#x2F;175464203&quot;&gt;Hamburger Bahnhof&lt;&#x2F;a&gt;: Modern art museum (public).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;3641040703&quot;&gt;KW Institute for Contemporary Art&lt;&#x2F;a&gt;: Modern art museum (private).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;2741770297&quot;&gt;Neurotitan gallery&lt;&#x2F;a&gt;: Small exhibition room at the back of a book&#x2F;art&#x2F;zine store.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;2959465154&quot;&gt;C&#x2F;O Berlin&lt;&#x2F;a&gt;: Exhibition (most of the time photography).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;4219262248&quot;&gt;Sammlung Boros&lt;&#x2F;a&gt;: A nazi bunker repurposed into a fruit storage place in the DDR then into a club after the fall of the wall then finally into modern art gallery. It&#x27;s only guided tours where you learn about the art pieces and the history of the building.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;history&quot;&gt;History&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;281391655&quot;&gt;Stasi Museum&lt;&#x2F;a&gt;: Museum about the DDR&#x27;s state security service. The building used to be the headquarters of the Stasi.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;way&#x2F;45664094&quot;&gt;Dokumentationszentrum Berliner Mauer&lt;&#x2F;a&gt;: A free museum about Berlin&#x27;s wall and in my opinion the best one, you can see a complete section of the wall with a watchtower as well as archive videos.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;artifacts&quot;&gt;Artifacts&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;way&#x2F;22990151&quot;&gt;Museum of Musical Instruments&lt;&#x2F;a&gt;: Small but cute museum showing a lot of musical instruments from all ages.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;events&quot;&gt;Events&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.meetup.com&#x2F;de-DE&#x2F;creativecodeberlin&#x2F;&quot;&gt;Creative coding meetups&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.lange-nacht-der-museen.de&quot;&gt;Lange nacht der museen&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.selbstgebautemusik.de&#x2F;&quot;&gt;Selbstgebautemusik festival&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;shops&quot;&gt;Shops&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;1502983701&quot;&gt;Modulor&lt;&#x2F;a&gt;: Huge art supply shop, there&#x27;s a lot to see in there.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;other&quot;&gt;Other&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;way&#x2F;125194752&quot;&gt;Botanical garden&lt;&#x2F;a&gt;: Probably the most beautiful place in Berlin, especially the greenhouses.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;node&#x2F;5153435222&quot;&gt;Il kino&lt;&#x2F;a&gt;: Small independent cinema with a good selection of movies.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Color palettes</title>
        <published>2022-10-23T00:00:00+00:00</published>
        <updated>2022-10-23T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/notes/palettes/"/>
        <id>https://duckpuck.net/notes/palettes/</id>
        
        <content type="html" xml:base="https://duckpuck.net/notes/palettes/">&lt;h2 id=&quot;2026-current&quot;&gt;2026 - Current&lt;&#x2F;h2&gt;
&lt;p&gt;Taken from this &lt;a href=&quot;https:&#x2F;&#x2F;lospec.com&#x2F;palette-list&#x2F;slso8&quot;&gt;website&lt;&#x2F;a&gt;, I just changed the darkest color.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;span class=&quot;color_square&quot; style=&quot;background-color: #0a1926&quot;
  &gt;#0a1926&lt;&#x2F;span
&gt;

&lt;span class=&quot;color_square&quot; style=&quot;background-color: #203c56&quot;
  &gt;#203c56&lt;&#x2F;span
&gt;

&lt;span class=&quot;color_square&quot; style=&quot;background-color: #544e68&quot;
  &gt;#544e68&lt;&#x2F;span
&gt;

&lt;span class=&quot;color_square&quot; style=&quot;background-color: #8d697a&quot;
  &gt;#8d697a&lt;&#x2F;span
&gt;

&lt;span class=&quot;color_square&quot; style=&quot;background-color: #d08159&quot;
  &gt;#d08159&lt;&#x2F;span
&gt;

&lt;span class=&quot;color_square&quot; style=&quot;background-color: #ffaa5e&quot;
  &gt;#ffaa5e&lt;&#x2F;span
&gt;

&lt;span class=&quot;color_square&quot; style=&quot;background-color: #ffd4a3&quot;
  &gt;#ffd4a3&lt;&#x2F;span
&gt;

&lt;span class=&quot;color_square&quot; style=&quot;background-color: #ffecd6&quot;
  &gt;#ffecd6&lt;&#x2F;span
&gt;
&lt;&#x2F;p&gt;
&lt;h1 id=&quot;2023-2026&quot;&gt;2023 - 2026&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;fkb&#x2F;-&#x2F;tree&#x2F;6616c29a395c0183f584c25d7b174eb8b1299c74&#x2F;static&#x2F;images&#x2F;screenshots&#x2F;2023_2025&quot;&gt;Screnshots&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;span class=&quot;color_square&quot; style=&quot;background-color: #000000&quot;
  &gt;#000000&lt;&#x2F;span
&gt;

&lt;span class=&quot;color_square&quot; style=&quot;background-color: #2e7484&quot;
  &gt;#2e7484&lt;&#x2F;span
&gt;

&lt;span class=&quot;color_square&quot; style=&quot;background-color: #dcd8d0&quot;
  &gt;#dcd8d0&lt;&#x2F;span
&gt;
&lt;&#x2F;p&gt;
&lt;h1 id=&quot;2021-2023&quot;&gt;2021 - 2023&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;fkb&#x2F;-&#x2F;tree&#x2F;6616c29a395c0183f584c25d7b174eb8b1299c74&#x2F;static&#x2F;images&#x2F;screenshots&#x2F;2021_2023&quot;&gt;Screenshots&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;span class=&quot;color_square&quot; style=&quot;background-color: #242c33&quot;
  &gt;#242c33&lt;&#x2F;span
&gt;

&lt;span class=&quot;color_square&quot; style=&quot;background-color: #dcd8d0&quot;
  &gt;#dcd8d0&lt;&#x2F;span
&gt;
&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Wikipedia articles</title>
        <published>2022-08-26T00:00:00+00:00</published>
        <updated>2022-08-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/notes/wikipedia-articles/"/>
        <id>https://duckpuck.net/notes/wikipedia-articles/</id>
        
        <content type="html" xml:base="https://duckpuck.net/notes/wikipedia-articles/">
&lt;div class=&quot;image small-image&quot;&gt;
    &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;wiki.png&quot; alt=&quot;glitched logo of wikipedia&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Aleatoric_music&quot;&gt;Aleatoric music&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Astroid&quot;&gt;Astroid&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;?title=Backpropagation&quot;&gt;Backpropagation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Cistercian_numerals&quot;&gt;Cistercian numerals&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Convolution&quot;&gt;Convolution&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Halftone&quot;&gt;Halftone&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Inverse_kinematics&quot;&gt;Inverse kinematics&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Lambert%27s_cosine_law&quot;&gt;Lambert&#x27;s cosine law&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Penrose_tiling&quot;&gt;Penrose tiling&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Physarum_polycephalum&quot;&gt;Physarum polycephalum&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Player_piano&quot;&gt;Player piano&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ragnar%C3%B6k&quot;&gt;Ragnarök&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Relative_luminance&quot;&gt;Relative luminance&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Steganography&quot;&gt;Steganography&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Wabi-sabi&quot;&gt;Wabi-sabi&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Glitched factory log</title>
        <published>2022-07-26T00:00:00+00:00</published>
        <updated>2022-07-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/notes/glitched-factory-log/"/>
        <id>https://duckpuck.net/notes/glitched-factory-log/</id>
        
        <content type="html" xml:base="https://duckpuck.net/notes/glitched-factory-log/">&lt;h2 id=&quot;backstory&quot;&gt;Backstory&lt;&#x2F;h2&gt;
&lt;p&gt;In 2019, after stumbling upon &lt;a href=&quot;http:&#x2F;&#x2F;ucnv.github.io&#x2F;pnglitch&#x2F;&quot;&gt;an article about PNG glitch&lt;&#x2F;a&gt; and became obsessed with the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ucnv&#x2F;pnglitch&quot;&gt;library&lt;&#x2F;a&gt; created by the writer of the article. Beside the beautiful aesthetic of glitch art there&#x27;s something interesting about the idea of creating a pleasing image out of something that is usually considered broken.&lt;&#x2F;p&gt;
&lt;p&gt;After a while I casually talked about this with a friend only for him to tell me that he also played with glitch art using After Effect. This conversation started a collaboration that we decided to call Glitched Factory.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;glitched-factory-output&quot;&gt;Glitched Factory output&lt;&#x2F;h2&gt;
&lt;p&gt;You can find the result of this collaboration on &lt;a href=&quot;https:&#x2F;&#x2F;www.instagram.com&#x2F;glitched_factory&#x2F;&quot;&gt;instagram&lt;&#x2F;a&gt; or &lt;a href=&quot;https:&#x2F;&#x2F;mastodon.social&#x2F;@GlitchedFactory&quot;&gt;mastodon&lt;&#x2F;a&gt; depending if you fancy a close or open garden.&lt;&#x2F;p&gt;
&lt;p&gt;An important achievement of the collaboration is the clip &lt;a href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=79T8c0vW0ik&quot;&gt;Redsun by CONCEPTUAL&lt;&#x2F;a&gt; created only using glitched images created with our tool.&lt;&#x2F;p&gt;
&lt;p&gt;The tools used are mostly After Effect, Blender and a custom GUI software.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;gui-creation&quot;&gt;GUI creation&lt;&#x2F;h2&gt;
&lt;p&gt;When playing with the library I mostly created small wrapper around it that could be called in the console &lt;strong&gt;[1]&lt;&#x2F;strong&gt;. The development time was very short and worked perfectly for myself but my friend never used the console, didn&#x27;t had the time or enough reason to start using it.&lt;&#x2F;p&gt;
&lt;p&gt;Therefore the first step of this collaboration was to create a GUI around pnglitch library.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;let-s-start-with-ruby&quot;&gt;Let&#x27;s start with Ruby&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ucnv&#x2F;pnglitch&quot;&gt;Pnglitch&lt;&#x2F;a&gt; is written in Ruby and it&#x27;s also the language I&#x27;m working with daily so for the creation of this tool the language choice was easy.&lt;&#x2F;p&gt;
&lt;p&gt;At that point the only GUI library capable of creating binaries was Shoes version 2 &lt;strong&gt;[2]&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;As the execution of the glitch algorithm are rather slow I implemented a small Ruby library to create and manage a small queue in a separate asynchronously to prevent the GUI to freeze. This library is called &lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;tiny-conveyor&#x2F;&quot;&gt;Tiny conveyor&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;After creating a working prototype that could run on Linux, MacOs and Windows we decided to create our own filters and add them to the GUI.&lt;&#x2F;p&gt;
&lt;p&gt;That&#x27;s where the limits of Ruby became a little bit too obvious. Those new filters are manipulating all the pixels of the input image, depending on the image that can be a lot of pixel to handle.&lt;&#x2F;p&gt;
&lt;p&gt;Ruby is a great language but not the fastest one, so those filter needed to be written in a more efficiant language.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;ruby-yes-but-rust-as-well&quot;&gt;Ruby yes but Rust as well&lt;&#x2F;h3&gt;
&lt;p&gt;Using FFI it&#x27;s pretty easy to call C libraries from Ruby code, but even better : Rust can be compiled into C libraries. As I wanted to try Rust for quite some time I picked this lanugage and start to rewrite the new filters in this language.&lt;&#x2F;p&gt;
&lt;p&gt;The Rust library is called &lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;arko&#x2F;&quot;&gt;Arko&lt;&#x2F;a&gt; and the Ruby library including the compiled C library for Linux, MacOs and windows as well as the ffi bindings is called &lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;rusty-engine&#x2F;&quot;&gt;Rusty engine&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Here a schema of the stack :&lt;&#x2F;p&gt;

&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;glitch_art_tools.svg&quot; alt=&quot;Glitched factory diagram&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;The code of the software is available on the &lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;legacy-glitched-factory&#x2F;&quot;&gt;(legacy) Glitched factory page&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;it-s-never-really-done-is-it&quot;&gt;It&#x27;s never really done is it ?&lt;&#x2F;h3&gt;
&lt;p&gt;At this point I&#x27;m happy with the tool, it&#x27;s not the sofware and the binaries are heavy &lt;strong&gt;[3]&lt;&#x2F;strong&gt; but all the needed features are implemented and a binary is available for Linux, MacOs and Windows. That&#x27;s enough for me.&lt;&#x2F;p&gt;
&lt;p&gt;Unfortunately the main maintainer of Shoes 2 decided to stop working on the library and declared it abandonware. The app was already not super stable and from time to time crashed for no reasons so I knew that the current state will not allow this app to work well in the future.&lt;&#x2F;p&gt;
&lt;p&gt;As an alternative to Shoes 2 I found Glimmer, a Jruby GUI framework. After adapting the code from the previous app the result was promising but I learned a bit late that JRuby doesn&#x27;t support FFI, which meant going back to the slow custom filters.&lt;&#x2F;p&gt;
&lt;p&gt;On top of that, setting up the development environment was combersome as Glimmer only worked with specific versions of JVM and JRuby.&lt;&#x2F;p&gt;
&lt;p&gt;The code for the prototype is available here : &lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;glitched-factory-jruby&quot;&gt;Glitched Factory Jruby&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;ok-then-rust-all-the-way&quot;&gt;Ok then, Rust all the way&lt;&#x2F;h3&gt;
&lt;p&gt;During all this time I was using the wrong tool for the task to do, again Ruby is a great language but because it isn&#x27;t compiled trying to create a desktop app with it only lead to useless complexity and slow output.&lt;&#x2F;p&gt;
&lt;p&gt;JRuby was a bit better regarding the compiled part but still far from being perfect.&lt;&#x2F;p&gt;
&lt;p&gt;The obvious choice of language for creating the software I wanted all this time was now Rust, it&#x27;s fast, compile easily to the targeted OS and it&#x27;s fun to work with.&lt;&#x2F;p&gt;
&lt;p&gt;But that change of language meant two things :&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;A GUI framework for Rust was necessary&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Pnglitch needs to be also rewritten in Rust&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;For the first point egui was quickly adopted, even if the look doesn&#x27;t blend in each OS it&#x27;s fun and fast to work with.&lt;&#x2F;p&gt;
&lt;p&gt;The second point is an ongoing process that you can follow here : &lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;pnglitcher&#x2F;&quot;&gt;Pnglitcher&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Notes&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;[1]&lt;&#x2F;strong&gt; More info about this CLI tool here : &lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;png-glitcher&#x2F;&quot;&gt;PNG glitcher&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;[2]&lt;&#x2F;strong&gt; The version 3 of Shoes is fully rewritten in JRuby and was still heavily WIP at this time.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;[3]&lt;&#x2F;strong&gt; When creating the binaries Shoes include a entire Ruby runtime this leads to heavy binaries by default.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Glitched factory</title>
        <published>2022-07-26T00:00:00+00:00</published>
        <updated>2022-07-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/png-glitch-art-tools/glitched-factory/"/>
        <id>https://duckpuck.net/projects/png-glitch-art-tools/glitched-factory/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/png-glitch-art-tools/glitched-factory/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;glitched_factory.png&quot; alt=&quot;Glitched logo of Glitched factory&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;The Glitched Factory is my most meaningfull project to date. It is both a software and an art project (confusing, I know).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;software&quot;&gt;Software&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;glitchedfactory.com&#x2F;software&#x2F;&quot;&gt;homepage&lt;&#x2F;a&gt; - &lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;png-glitch&#x2F;glitched-factory&quot;&gt;codebase&lt;&#x2F;a&gt; - &lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;notes&#x2F;glitched-factory-log&#x2F;&quot;&gt;development log&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Available for Linux, Macos and Windows this software provide a simple interface to create glitched from .png images. Most of the images present on this website are processed using this software.&lt;&#x2F;p&gt;
&lt;p&gt;The Glitched Factory is free and open source, it was developped to be used regardless of technical skills and knowledge.&lt;&#x2F;p&gt;
&lt;p&gt;On the homepage you can find a complete documentation covering all the features, this documentation is also embeded in the help tab of the software. You will also find a download link for each OS.&lt;&#x2F;p&gt;
&lt;p&gt;If you wish to compile the project from source you can find the necessary information on the README file in the codebase.&lt;&#x2F;p&gt;

&lt;iframe src=&quot;https:&#x2F;&#x2F;itch.io&#x2F;embed&#x2F;1652402?bg_color=1C1C1C&amp;amp;fg_color=E3E3E3&amp;amp;link_color=67093A&amp;amp;border_color=E3E3E3&quot;
                max-width=&quot;552px&quot;
                height=&quot;167&quot;
                frameborder=&quot;0&quot;&gt;
    &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;https:&amp;#x2F;&amp;#x2F;duckpuck.itch.io&amp;#x2F;glitchedfactory&quot;&gt;Glitched Factory by duckpuck&lt;&#x2F;a&gt;
&lt;&#x2F;iframe&gt;
&lt;h2 id=&quot;art-project&quot;&gt;Art project&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;glitchedfactory.com&quot;&gt;homepage&lt;&#x2F;a&gt; - &lt;a href=&quot;https:&#x2F;&#x2F;mastodon.social&#x2F;web&#x2F;@GlitchedFactory&quot;&gt;mastodon&lt;&#x2F;a&gt; - &lt;a href=&quot;https:&#x2F;&#x2F;www.instagram.com&#x2F;glitched_factory&#x2F;&quot;&gt;instagram&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Using the software above as source of inspiration this art project search way of use it alongside other software (Blender, After Effect, Photoshop, etc.) to create images and videos.&lt;&#x2F;p&gt;
&lt;p&gt;You can find all the images and videos on the website, mastodon or instagram.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Pnglitcher</title>
        <published>2022-06-08T00:00:00+00:00</published>
        <updated>2022-06-08T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/png-glitch-art-tools/pnglitcher/"/>
        <id>https://duckpuck.net/projects/png-glitch-art-tools/pnglitcher/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/png-glitch-art-tools/pnglitcher/">&lt;p&gt;This crate contains a library allowing you to glitch PNG images. Most of the code comes from the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;image-rs&#x2F;image-png&quot;&gt;PNG encoder&lt;&#x2F;a&gt; written for the wonderful &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;image-rs&#x2F;image&quot;&gt;Image crate&lt;&#x2F;a&gt;.
The idea here is to provide a tool similar to the Ruby gem &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ucnv&#x2F;pnglitch&quot;&gt;PNGlitch&lt;&#x2F;a&gt; for Rust. The output of an image will not be the exact same as PNGlitch, it&#x27;s simply used for inspiration.&lt;&#x2F;p&gt;
&lt;p&gt;At the moment this cargo is in heavy WIP, any release could introduce breaking changes so please use this crate for having fun and create weird looking PNG images.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-to-use&quot;&gt;How to use&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;duplicate&quot;&gt;Duplicate&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;single-filter&quot;&gt;Single filter&lt;&#x2F;h4&gt;
&lt;p&gt;For each occurence this algorithm will copy data from another part of the image, then force the png to use a given filter.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Params&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;input(str): The path to the input png image.&lt;&#x2F;li&gt;
&lt;li&gt;output(str): The path to the output png image (without extension).&lt;&#x2F;li&gt;
&lt;li&gt;overwrite: specify if the output file should overwrite any existing image with the same name&lt;&#x2F;li&gt;
&lt;li&gt;filter(u8): From 0 to 5, define the filter used when saving the image.&lt;&#x2F;li&gt;
&lt;li&gt;occurence(usize): Occurence of the glitch, 1 means every column of the image.&lt;&#x2F;li&gt;
&lt;li&gt;gap(usize): The number of column skipped before the first occurence&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;duplicate(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input1.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output1&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;duplicate(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input2.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output2&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1000&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h4 id=&quot;sample&quot;&gt;Sample&lt;&#x2F;h4&gt;
&lt;p&gt;Create a sample using duplicate algorithm for all filters for a given image&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Params&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;input(str): The path to the input png image.&lt;&#x2F;li&gt;
&lt;li&gt;output(str): The path to the output png image (without extension).&lt;&#x2F;li&gt;
&lt;li&gt;overwrite: specify if the output file should overwrite any existing image with the same name&lt;&#x2F;li&gt;
&lt;li&gt;occurence(usize): Occurence of the glitch, 1 means every column of the image.&lt;&#x2F;li&gt;
&lt;li&gt;gap(usize): The number of column skipped before the first occurence&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;duplicate_sample(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input1.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output1&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;duplicate_sample(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input2.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output2&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1000&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;replace&quot;&gt;Replace&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;single-filter-1&quot;&gt;Single filter&lt;&#x2F;h4&gt;
&lt;p&gt;For each occurence this algorithm will replace the data with 0, then force the png to use a given filter.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Params&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;input(str): The path to the input png image.&lt;&#x2F;li&gt;
&lt;li&gt;output(str): The path to the output png image (without extension).&lt;&#x2F;li&gt;
&lt;li&gt;overwrite: specify if the output file should overwrite any existing image with the same name&lt;&#x2F;li&gt;
&lt;li&gt;filter(u8): From 0 to 5, define the filter used when saving the image.&lt;&#x2F;li&gt;
&lt;li&gt;occurence(usize): Occurence of the glitch, 1 means every column of the image.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;replace(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input1.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output1&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;replace(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input2.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output2&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;4&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h4 id=&quot;sample-1&quot;&gt;Sample&lt;&#x2F;h4&gt;
&lt;p&gt;Create a sample using duplicate algorithm for all filters for a given image&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Params&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;input(str): The path to the input png image.&lt;&#x2F;li&gt;
&lt;li&gt;output(str): The path to the output png image (without extension).&lt;&#x2F;li&gt;
&lt;li&gt;overwrite: specify if the output file should overwrite any existing image with the same name&lt;&#x2F;li&gt;
&lt;li&gt;occurence(usize): Occurence of the glitch, 1 means every column of the image.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;replace_sample(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input1.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output1&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;replace_sample(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input2.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output2&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;10&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;variable-filter&quot;&gt;Variable filter&lt;&#x2F;h3&gt;
&lt;p&gt;Save each lines with a different png filter.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Params&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;input(str): The path to the input png image.&lt;&#x2F;li&gt;
&lt;li&gt;output(str): The path to the output png image (without extension).&lt;&#x2F;li&gt;
&lt;li&gt;overwrite: specify if the output file should overwrite any existing image with the same name&lt;&#x2F;li&gt;
&lt;li&gt;random(boolean): Defines if the choice of the filter is random or sequential.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;variable_filter(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input1.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output1&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;variable_filter(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input2.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output2&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;wrong-filter&quot;&gt;Wrong filter&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;single-filter-2&quot;&gt;Single filter&lt;&#x2F;h4&gt;
&lt;p&gt;Force the png encoder to use a wrong filter&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Params&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;input(str): The path to the input png image.&lt;&#x2F;li&gt;
&lt;li&gt;output(str): The path to the output png image (without extension).&lt;&#x2F;li&gt;
&lt;li&gt;overwrite: specify if the output file should overwrite any existing image with the same name&lt;&#x2F;li&gt;
&lt;li&gt;filter(u8): From 0 to 5, define the filter used when saving the image.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;wrong_filter(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input1.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output1&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;wrong_filter(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input2.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output2&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h4 id=&quot;sample-2&quot;&gt;Sample&lt;&#x2F;h4&gt;
&lt;p&gt;Create a sample using wrong filter algorithm for all filters for a given image&lt;strong&gt;Params&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;input(str): The path to the input png image.&lt;&#x2F;li&gt;
&lt;li&gt;output(str): The path to the output png image (without extension).&lt;&#x2F;li&gt;
&lt;li&gt;overwrite: specify if the output file should overwrite any existing image with the same name&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;wrong_filter_sample(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input1.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output1&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;pnglitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;wrong_filter_sample(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input2.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output2&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Png glitch art tools</title>
        <published>2022-01-29T00:00:00+00:00</published>
        <updated>2022-01-29T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/png-glitch-art-tools/"/>
        <id>https://duckpuck.net/projects/png-glitch-art-tools/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/png-glitch-art-tools/">&lt;p&gt;A list of the tools created for making glitch art. If you are interested in the development process of those tools you can read the &lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;notes&#x2F;glitched-factory-log&#x2F;&quot;&gt;Glitched factory log&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;softwares&quot;&gt;Softwares&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;glitched-factory&#x2F;&quot;&gt;Glitched factory&lt;&#x2F;a&gt;: the easiest way to glitch png images, you just have to download the software for your OS (Linux, OSX or Windows) and use the gui to mess with your images.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;legacy-glitched-factory&#x2F;&quot;&gt;(legacy) Glitched factory&lt;&#x2F;a&gt;: you probably don&#x27;t want to use this software, use the one above instead. I keep it on this website for archival and reference purposes.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;libraries&quot;&gt;Libraries&lt;&#x2F;h2&gt;
&lt;p&gt;Libraries used by the two softwares above, you can use them from a Rust or Ruby code base.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;rust&quot;&gt;Rust&lt;&#x2F;h3&gt;
&lt;p&gt;Those libraries may be used to create glitched images directly in Rust.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;pnglitcher&#x2F;&quot;&gt;Pnglitcher&lt;&#x2F;a&gt;: implement all the png glitch algorithms (it&#x27;s messing on purpose with the PNG file format).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;arko&#x2F;&quot;&gt;Arko&lt;&#x2F;a&gt;: implement some pixel manipulation algorithms (think pixel sorting). JPEG is supported by this library alongside PNG.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;ruby&quot;&gt;Ruby&lt;&#x2F;h3&gt;
&lt;p&gt;These libraries may be used to create glitched images directly in Ruby.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;rusty-engine&#x2F;&quot;&gt;Rusty engine&lt;&#x2F;a&gt;: this is a wrapper for Arko, so it provides the exact same features but can be called from a Ruby codebase.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;shattered-machine&#x2F;&quot;&gt;Shattered machine&lt;&#x2F;a&gt;: this library is bundle rusty engine and pnglitch, it was the main library used in the legacy version of the glitched factory but it&#x27;s still working fine.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Arko</title>
        <published>2022-01-29T00:00:00+00:00</published>
        <updated>2022-01-29T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/png-glitch-art-tools/arko/"/>
        <id>https://duckpuck.net/projects/png-glitch-art-tools/arko/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/png-glitch-art-tools/arko/">&lt;p&gt;arko is a small library providing three pixel manipulation algorithms :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Brush : Create some kind of brush effect&lt;&#x2F;li&gt;
&lt;li&gt;Slim : Copy a pixel over a ramdom numbers of pixel on the same line or column&lt;&#x2F;li&gt;
&lt;li&gt;Sort : A classic pixel sorting&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The library also contains a minimal image convertion tool (supporting png and jpg).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-to-use-it&quot;&gt;How to use it&lt;&#x2F;h2&gt;
&lt;p&gt;All of the algorithms can be used in four directions :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;bottom to top&lt;&#x2F;li&gt;
&lt;li&gt;left to right&lt;&#x2F;li&gt;
&lt;li&gt;right to left&lt;&#x2F;li&gt;
&lt;li&gt;top to bottom&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;For algorithms using colors here are the complete list of available colors : &quot;white&quot;, &quot;black&quot;, &quot;grey&quot;, &quot;red&quot;, &quot;yellow&quot;, &quot;green&quot;, &quot;cyan&quot;, &quot;blue&quot;, &quot;magenta&quot;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;brush&quot;&gt;Brush&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;Params :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;in_img(str) : path to the input image&lt;&#x2F;li&gt;
&lt;li&gt;out_img(ste) : path to the output image&lt;&#x2F;li&gt;
&lt;li&gt;force_ouput_overwrite(bool) : flag to allow overwriting of the output image if present&lt;&#x2F;li&gt;
&lt;li&gt;proba(i32) : the probability for the algorithm to have effect on a pixel&lt;&#x2F;li&gt;
&lt;li&gt;min(i32) : the minimum of pixel affected when the algorithm starts&lt;&#x2F;li&gt;
&lt;li&gt;max(i32) : the maximum of pixel affected when the algorithm starts&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;brush_bottom_to_top(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;btt.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;4&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;brush_left_to_right(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;ltr.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;4&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;brush_right_to_left(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;rtl.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;4&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;brush_top_to_bottom(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;ttb.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;4&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;slim&quot;&gt;Slim&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;probability-global&quot;&gt;Probability global&lt;&#x2F;h4&gt;
&lt;p&gt;When using these functions the probability is the same applyed to all colors.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Params :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;in_img(str) : path to the input image&lt;&#x2F;li&gt;
&lt;li&gt;out_img(ste) : path to the output image&lt;&#x2F;li&gt;
&lt;li&gt;force_ouput_overwrite(bool) : flag to allow overwriting of the output image if present&lt;&#x2F;li&gt;
&lt;li&gt;proba(i32) : the probability for the algorithm to effect the next pixel when activated&lt;&#x2F;li&gt;
&lt;li&gt;colors(Vec &amp;lt; Colors &amp;gt;) : the list of colors affect by the algorithm&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;slim_bottom_to_top_per_color(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;btt.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;vec![(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Red&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Yellow&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;34&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Green&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;56&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Cyan&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;45&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Blue&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;64&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Magenta&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;23&lt;&#x2F;span&gt;&lt;span&gt;)])&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;slim_left_to_right_per_color(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;ltr.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;vec![(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Red&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Yellow&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;34&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Green&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;56&lt;&#x2F;span&gt;&lt;span&gt;)])&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;slim_right_to_left_per_color(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;rtl.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;vec![(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Green&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;56&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Cyan&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;45&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Blue&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;64&lt;&#x2F;span&gt;&lt;span&gt;)])&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;slim_top_to_bottom_per_color(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;ttb.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;vec![(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Cyan&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;45&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Blue&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;64&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Magenta&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;23&lt;&#x2F;span&gt;&lt;span&gt;)])&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h4 id=&quot;probability-per-colors&quot;&gt;Probability per colors&lt;&#x2F;h4&gt;
&lt;p&gt;When using these functions the probability is provided per color.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Params :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;in_img(str) : path to the input image&lt;&#x2F;li&gt;
&lt;li&gt;out_img(ste) : path to the output image&lt;&#x2F;li&gt;
&lt;li&gt;force_ouput_overwrite(bool) : flag to allow overwriting of the output image if present&lt;&#x2F;li&gt;
&lt;li&gt;colors_proba(Vec&amp;lt;(Colors, i32)&amp;gt;) : affected colors with their probability&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;slim_bottom_to_top_per_color(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;btt.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;vec![(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Red&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Yellow&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;34&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Green&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;56&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Cyan&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;45&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Blue&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;64&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Magenta&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;23&lt;&#x2F;span&gt;&lt;span&gt;)])&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;slim_left_to_right_per_color(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;ltr.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;vec![(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Red&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Yellow&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;34&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Green&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;56&lt;&#x2F;span&gt;&lt;span&gt;)])&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;slim_right_to_left_per_color(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;rtl.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;vec![(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Green&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;56&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Cyan&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;45&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Blue&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;64&lt;&#x2F;span&gt;&lt;span&gt;)])&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;slim_top_to_bottom_per_color(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;ttb.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;vec![(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Cyan&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;45&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Blue&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;64&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;(Colors&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;Magenta&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;23&lt;&#x2F;span&gt;&lt;span&gt;)])&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;sort-brut&quot;&gt;Sort (Brut)&lt;&#x2F;h3&gt;
&lt;p&gt;These functions will affect the entire image and sort pixels either horizontally either vertically.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Params :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;in_img(str) : path to the input image&lt;&#x2F;li&gt;
&lt;li&gt;out_img(ste) : path to the output image&lt;&#x2F;li&gt;
&lt;li&gt;force_ouput_overwrite(bool) : flag to allow overwriting of the output image if present&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;sort_brut_bottom_to_top(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;btt.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;sort_brut_left_to_right(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;ltr.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;sort_brut_right_to_left(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;rtl.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;sort_brut_top_to_bottom(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;ttb.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;sort-smart&quot;&gt;Sort (Smart)&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;Params :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;in_img(str) : path to the input image&lt;&#x2F;li&gt;
&lt;li&gt;out_img(ste) : path to the output image&lt;&#x2F;li&gt;
&lt;li&gt;force_ouput_overwrite(bool) : flag to allow overwriting of the output image if present&lt;&#x2F;li&gt;
&lt;li&gt;detection_type(i32) :
&lt;ul&gt;
&lt;li&gt;0 : detection by lightness&lt;&#x2F;li&gt;
&lt;li&gt;1 : detection by color group&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;detection_min(i32) : the minimum of pixel affected when the algorithm starts (first range)&lt;&#x2F;li&gt;
&lt;li&gt;detection_max(i32) : the maximum of pixel affected when the algorithm starts (first range)&lt;&#x2F;li&gt;
&lt;li&gt;multiple_range(bool) : either use one or two ranges&lt;&#x2F;li&gt;
&lt;li&gt;detection_min_2(i32) : the minimum of pixel affected when the algorithm starts (second range)&lt;&#x2F;li&gt;
&lt;li&gt;detection_max_2(i32) : the maximum of pixel affected when the algorithm starts (second range)&lt;&#x2F;li&gt;
&lt;li&gt;sorting_by(i32) :
&lt;ul&gt;
&lt;li&gt;0 : sorting by hue&lt;&#x2F;li&gt;
&lt;li&gt;1 : sorting by saturation&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;sort_bottom_to_top(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;btt.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;50&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;360&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;false&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;sort_left_to_right(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;ltr.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;50&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;360&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;false&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;sort_right_to_left(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;rtl.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;50&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;60&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;70&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;80&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;sort_top_to_bottom(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;ttb.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;50&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;60&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;90&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;converter&quot;&gt;Converter&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;Params :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;in_img(str) : path to the input image&lt;&#x2F;li&gt;
&lt;li&gt;out_img(ste) : path to the output image&lt;&#x2F;li&gt;
&lt;li&gt;force_ouput_overwrite(bool) : flag to allow overwriting of the output image if present&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Examples :&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;arko&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;convert(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;input.png&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;output.jpg&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Danish memo</title>
        <published>2022-01-05T00:00:00+00:00</published>
        <updated>2022-01-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/notes/danish-memo/"/>
        <id>https://duckpuck.net/notes/danish-memo/</id>
        
        <content type="html" xml:base="https://duckpuck.net/notes/danish-memo/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;dk.png&quot; alt=&quot;glitched flag of denmark&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h2 id=&quot;pronunciation&quot;&gt;Pronunciation&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;ae-o-a&quot;&gt;Æ Ø Å&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;Æ&lt;&#x2F;strong&gt; is pronounced like [ai] (lait)&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Ø&lt;&#x2F;strong&gt; is pronounced like [eu] (heureux)&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Å&lt;&#x2F;strong&gt; is pronounced like [o] (bol)&lt;&#x2F;p&gt;
&lt;h3 id=&quot;soft-d&quot;&gt;Soft D&lt;&#x2F;h3&gt;
&lt;p&gt;When to use the soft d :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;A vowel followed by &lt;strong&gt;-d&lt;&#x2F;strong&gt; or &lt;strong&gt;-dd&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;li&gt;A word ends with &lt;strong&gt;-et&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Exceptions :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;A single syllable containing a vowel followed by &lt;strong&gt;-ds&lt;&#x2F;strong&gt; : the d become silent&lt;&#x2F;li&gt;
&lt;li&gt;A single syllable containing a vowel followed by &lt;strong&gt;-dt&lt;&#x2F;strong&gt; : the d become silent&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=njWi-MA39YE&quot;&gt;Here&#x27;s a pretty good video&lt;&#x2F;a&gt; to help with the pronunciation.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;grammar&quot;&gt;Grammar&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;grammatical-gender&quot;&gt;Grammatical gender&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;en&lt;&#x2F;strong&gt; : common gender&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;et&lt;&#x2F;strong&gt; : neutral gender&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Group&lt;&#x2F;th&gt;&lt;th&gt;Singular indefinite&lt;&#x2F;th&gt;&lt;th&gt;Singular definite&lt;&#x2F;th&gt;&lt;th&gt;Plural indefinite&lt;&#x2F;th&gt;&lt;th&gt;Plural definite&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;1&lt;&#x2F;td&gt;&lt;td&gt;en bil&lt;&#x2F;td&gt;&lt;td&gt;bil&lt;strong&gt;en&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;bil&lt;strong&gt;er&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;bil&lt;strong&gt;erne&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;&#x2F;td&gt;&lt;td&gt;en dame&lt;&#x2F;td&gt;&lt;td&gt;dame&lt;strong&gt;n&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;dame&lt;strong&gt;r&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;dame&lt;strong&gt;rne&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;et hus&lt;&#x2F;td&gt;&lt;td&gt;hus&lt;strong&gt;et&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;hus&lt;strong&gt;e&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;hus&lt;strong&gt;ene&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;4&lt;&#x2F;td&gt;&lt;td&gt;en film&lt;&#x2F;td&gt;&lt;td&gt;film&lt;strong&gt;en&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;film-&lt;&#x2F;td&gt;&lt;td&gt;film&lt;strong&gt;ene&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;possessive-pronouns&quot;&gt;Possessive pronouns&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Person&lt;&#x2F;th&gt;&lt;th&gt;Singular common gender&lt;&#x2F;th&gt;&lt;th&gt;Singular neutral gender&lt;&#x2F;th&gt;&lt;th&gt;Plural&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;jeg&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;min&lt;&#x2F;strong&gt; bil&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;mit&lt;&#x2F;strong&gt; hus&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;mine&lt;&#x2F;strong&gt; biler&#x2F;huse&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;du&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;din&lt;&#x2F;strong&gt; bil&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;dit&lt;&#x2F;strong&gt; hus&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;dine&lt;&#x2F;strong&gt; biler&#x2F;huse&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;han&#x2F;hun&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;sin&lt;&#x2F;strong&gt; bil&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;sit&lt;&#x2F;strong&gt; hus&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;sine&lt;&#x2F;strong&gt; biler&#x2F;huse&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;han&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;hans&lt;&#x2F;strong&gt; bil&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;hans&lt;&#x2F;strong&gt; hus&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;hans&lt;&#x2F;strong&gt; biler&#x2F;huse&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;hun&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;hendes&lt;&#x2F;strong&gt; bil&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;hendes&lt;&#x2F;strong&gt; hus&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;hendes&lt;&#x2F;strong&gt; biler&#x2F;huse&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;vi&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;vores&lt;&#x2F;strong&gt; bil&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;vores&lt;&#x2F;strong&gt; hus&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;vores&lt;&#x2F;strong&gt; biler&#x2F;huse&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;i&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;jeres&lt;&#x2F;strong&gt; bil&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;jeres&lt;&#x2F;strong&gt; hus&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;jeres&lt;&#x2F;strong&gt; biler&#x2F;huse&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;de&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;deres&lt;&#x2F;strong&gt; bil&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;deres&lt;&#x2F;strong&gt; hus&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;deres&lt;&#x2F;strong&gt; biler&#x2F;huse&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;When to use &lt;strong&gt;hans&lt;&#x2F;strong&gt; and &lt;strong&gt;hendes&lt;&#x2F;strong&gt; :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The possessive pronoun is alos the subject of the sentence (or part of the subject) : &lt;code&gt;Hans børn kommer i morgen&lt;&#x2F;code&gt; - His children come tomorrow.&lt;&#x2F;li&gt;
&lt;li&gt;When the subject is not the owner : &lt;code&gt;Lisbeth kører hendes bil&lt;&#x2F;code&gt; - Lisbeth drive her car (in this case the car of someone else).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;attributive-adjective&quot;&gt;Attributive adjective&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Gender&lt;&#x2F;th&gt;&lt;th&gt;Attributive adjective&lt;&#x2F;th&gt;&lt;th&gt;Example&lt;&#x2F;th&gt;&lt;th&gt;Translation&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Singular common&lt;&#x2F;td&gt;&lt;td&gt;Base form&lt;&#x2F;td&gt;&lt;td&gt;vinen er &lt;strong&gt;god&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;the wine is good&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Singular neutral&lt;&#x2F;td&gt;&lt;td&gt;Base form + &lt;strong&gt;-t&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;teaterstykket er &lt;strong&gt;godt&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;the theatre piece is good&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Plural common&#x2F;neutral&lt;&#x2F;td&gt;&lt;td&gt;Base form + &lt;strong&gt;-e&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;teaterstykkerne er &lt;strong&gt;gode&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;the wines are good&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;doubling-last-consonants&quot;&gt;Doubling last consonants&lt;&#x2F;h3&gt;
&lt;p&gt;A name finishing by a brief vowel followed by a consonant will &lt;strong&gt;double the consonant&lt;&#x2F;strong&gt; in &lt;strong&gt;singular definite&lt;&#x2F;strong&gt; and &lt;strong&gt;plural forms&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Group&lt;&#x2F;th&gt;&lt;th&gt;Singular indefinite&lt;&#x2F;th&gt;&lt;th&gt;Singular definite&lt;&#x2F;th&gt;&lt;th&gt;Plural indefinite&lt;&#x2F;th&gt;&lt;th&gt;Plural definite&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;1&lt;&#x2F;td&gt;&lt;td&gt;en søn&lt;&#x2F;td&gt;&lt;td&gt;sønnen&lt;&#x2F;td&gt;&lt;td&gt;sønner&lt;&#x2F;td&gt;&lt;td&gt;sønnerne&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;&#x2F;td&gt;&lt;td&gt;en bus&lt;&#x2F;td&gt;&lt;td&gt;bussen&lt;&#x2F;td&gt;&lt;td&gt;busser&lt;&#x2F;td&gt;&lt;td&gt;busserne&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;en nat&lt;&#x2F;td&gt;&lt;td&gt;natten&lt;&#x2F;td&gt;&lt;td&gt;nætter&lt;&#x2F;td&gt;&lt;td&gt;nætterne&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;4&lt;&#x2F;td&gt;&lt;td&gt;en kop&lt;&#x2F;td&gt;&lt;td&gt;koppen&lt;&#x2F;td&gt;&lt;td&gt;kopper&lt;&#x2F;td&gt;&lt;td&gt;kopperne&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;short-answers&quot;&gt;Short answers&lt;&#x2F;h3&gt;
&lt;p&gt;Used to avoid answering a question by Yes or No only.&lt;&#x2F;p&gt;
&lt;p&gt;If the question contains a &lt;strong&gt;modal verb&lt;&#x2F;strong&gt; (vil, skal, må, kan) or an &lt;strong&gt;auxiliary verb&lt;&#x2F;strong&gt; : the verb is reused in the answer.&lt;&#x2F;p&gt;
&lt;p&gt;Construction :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ja + det + verb + subject&lt;&#x2F;strong&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Nej + det + verb + subject + ikke&lt;&#x2F;strong&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Example : &lt;code&gt;Har du en kæreste? Ja, det har jeg.&lt;&#x2F;code&gt; - Do you have a girlfriend? Yes, I do.&lt;&#x2F;p&gt;
&lt;p&gt;If the question doesn&#x27;t contain such verb : the verb &lt;strong&gt;gør&lt;&#x2F;strong&gt; is used instead.&lt;&#x2F;p&gt;
&lt;p&gt;Construction :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ja + det + gør + subject&lt;&#x2F;strong&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Nej + det + gør + subject + ikke&lt;&#x2F;strong&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Example : &lt;code&gt;Arbejder du i weekenden? Je det gør jeg.&lt;&#x2F;code&gt; - Are you working on the weekend? Yes, I do.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;subject-inversion&quot;&gt;Subject inversion&lt;&#x2F;h3&gt;
&lt;p&gt;There are three scenarios for wich the subject is inverted :&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;When asking a question (see Conjugation section below).&lt;&#x2F;li&gt;
&lt;li&gt;When starting a sentence with a &lt;strong&gt;complement&lt;&#x2F;strong&gt; or &lt;strong&gt;adverb&lt;&#x2F;strong&gt; : &lt;code&gt;I weekenden arbejder jeg.&lt;&#x2F;code&gt; - On weekends I work.&lt;&#x2F;li&gt;
&lt;li&gt;When starting a sentence with a &lt;strong&gt;subordinate proposal&lt;&#x2F;strong&gt; : &lt;code&gt;Når jeg arbejder, drikker jeg meget kaffe.&lt;&#x2F;code&gt; - When I work, I drink a lot of coffee.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;dynamic-and-static-prepositions&quot;&gt;Dynamic and static prepositions&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;When there&#x27;s an idea of movement the preposition to use is &lt;strong&gt;til&lt;&#x2F;strong&gt; : &lt;code&gt;Jeg skal til Århus på lørdag.&lt;&#x2F;code&gt; - I go to Århus saturday.&lt;&#x2F;li&gt;
&lt;li&gt;When there&#x27;s an idea of staticity the preposition to use is &lt;strong&gt;i&lt;&#x2F;strong&gt; : &lt;code&gt;Lisa er I Berlin&lt;&#x2F;code&gt; - Lisa is in Berlin.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;vocabulary&quot;&gt;Vocabulary&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;short-sentences&quot;&gt;Short sentences&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;Ja, det gør jeg&lt;&#x2F;strong&gt; : Yes, I do&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Vi ses senere&lt;&#x2F;strong&gt; : See you later&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Hvor skal du hen ?&lt;&#x2F;strong&gt; : Where are you going ? &lt;strong&gt;hen&lt;&#x2F;strong&gt; is an adverb that indicates movement&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Hvor arbejder du henne ?&lt;&#x2F;strong&gt; : Where are you working ? &lt;strong&gt;henne&lt;&#x2F;strong&gt; is an adverb that indicates immobility&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Hvornår kommer du hjem ?&lt;&#x2F;strong&gt; : When are you coming home ? &lt;strong&gt;hjem&lt;&#x2F;strong&gt; is an adverb that indicates movement&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Er du hjemme ?&lt;&#x2F;strong&gt; : Are you home? &lt;strong&gt;hjemme&lt;&#x2F;strong&gt; is an adverb that indicates immobility&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Om en halv time&lt;&#x2F;strong&gt; : In hal an hour&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Nogle&lt;&#x2F;strong&gt; : Some&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;I weekenden&lt;&#x2F;strong&gt; : The weekend&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Jeg er 28 år&lt;&#x2F;strong&gt; : I&#x27;m 28&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Hvad et der galt&lt;&#x2F;strong&gt; : What&#x27;s wrong?&lt;&#x2F;p&gt;
&lt;h3 id=&quot;interrogative-words&quot;&gt;Interrogative words&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Danish&lt;&#x2F;th&gt;&lt;th&gt;English&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Hvor&lt;&#x2F;td&gt;&lt;td&gt;Where&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvem&lt;&#x2F;td&gt;&lt;td&gt;Who&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvad&lt;&#x2F;td&gt;&lt;td&gt;What&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvornår&lt;&#x2F;td&gt;&lt;td&gt;When&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvofor&lt;&#x2F;td&gt;&lt;td&gt;Why&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvordan&lt;&#x2F;td&gt;&lt;td&gt;How&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvilken&lt;&#x2F;td&gt;&lt;td&gt;Which&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvad for en&lt;&#x2F;td&gt;&lt;td&gt;Which one&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvor mange&lt;&#x2F;td&gt;&lt;td&gt;How many&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvor længe&lt;&#x2F;td&gt;&lt;td&gt;How long&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvor gammel&lt;&#x2F;td&gt;&lt;td&gt;How old&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvis&lt;&#x2F;td&gt;&lt;td&gt;Whose&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hvor lang tid&lt;&#x2F;td&gt;&lt;td&gt;How much time&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;useful-words&quot;&gt;Useful words&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;Mange&lt;&#x2F;strong&gt; : Many&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Meget&lt;&#x2F;strong&gt; : Much&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Altid&lt;&#x2F;strong&gt; : Always&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Normalt&lt;&#x2F;strong&gt; : Usually&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Tit&lt;&#x2F;strong&gt; : Often&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Nogle gang&lt;&#x2F;strong&gt; : Sometimes&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Ikke så tit&lt;&#x2F;strong&gt; : Not so often&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Aldrig&lt;&#x2F;strong&gt; : Never&lt;&#x2F;p&gt;
&lt;h3 id=&quot;numbers&quot;&gt;Numbers&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Number&lt;&#x2F;th&gt;&lt;th&gt;Danish&lt;&#x2F;th&gt;&lt;th&gt;Cardinal&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;1&lt;&#x2F;td&gt;&lt;td&gt;en &#x2F;et&lt;&#x2F;td&gt;&lt;td&gt;første&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;&#x2F;td&gt;&lt;td&gt;to&lt;&#x2F;td&gt;&lt;td&gt;anden&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;tre&lt;&#x2F;td&gt;&lt;td&gt;tredje&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;4&lt;&#x2F;td&gt;&lt;td&gt;fire&lt;&#x2F;td&gt;&lt;td&gt;fjerde&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;fem&lt;&#x2F;td&gt;&lt;td&gt;femte&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;6&lt;&#x2F;td&gt;&lt;td&gt;seks&lt;&#x2F;td&gt;&lt;td&gt;sjette&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;7&lt;&#x2F;td&gt;&lt;td&gt;syv&lt;&#x2F;td&gt;&lt;td&gt;syvende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;8&lt;&#x2F;td&gt;&lt;td&gt;otte&lt;&#x2F;td&gt;&lt;td&gt;ottende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;9&lt;&#x2F;td&gt;&lt;td&gt;ni&lt;&#x2F;td&gt;&lt;td&gt;niende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;10&lt;&#x2F;td&gt;&lt;td&gt;ti&lt;&#x2F;td&gt;&lt;td&gt;tiende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;11&lt;&#x2F;td&gt;&lt;td&gt;elleve&lt;&#x2F;td&gt;&lt;td&gt;ellevte&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;12&lt;&#x2F;td&gt;&lt;td&gt;tolv&lt;&#x2F;td&gt;&lt;td&gt;tolvte&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;13&lt;&#x2F;td&gt;&lt;td&gt;tretten&lt;&#x2F;td&gt;&lt;td&gt;trettende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;14&lt;&#x2F;td&gt;&lt;td&gt;fjorten&lt;&#x2F;td&gt;&lt;td&gt;fjortende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;15&lt;&#x2F;td&gt;&lt;td&gt;femten&lt;&#x2F;td&gt;&lt;td&gt;femtende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;16&lt;&#x2F;td&gt;&lt;td&gt;seksten&lt;&#x2F;td&gt;&lt;td&gt;sekstende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;17&lt;&#x2F;td&gt;&lt;td&gt;sytten&lt;&#x2F;td&gt;&lt;td&gt;syttende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;18&lt;&#x2F;td&gt;&lt;td&gt;atten&lt;&#x2F;td&gt;&lt;td&gt;attende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;19&lt;&#x2F;td&gt;&lt;td&gt;nitten&lt;&#x2F;td&gt;&lt;td&gt;nittende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;20&lt;&#x2F;td&gt;&lt;td&gt;tyve&lt;&#x2F;td&gt;&lt;td&gt;tyvende&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;days&quot;&gt;Days&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Danish&lt;&#x2F;th&gt;&lt;th&gt;English&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Mandag&lt;&#x2F;td&gt;&lt;td&gt;Monday&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Tirsdag&lt;&#x2F;td&gt;&lt;td&gt;Tuesday&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Onsdag&lt;&#x2F;td&gt;&lt;td&gt;Wednesday&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Torsdag&lt;&#x2F;td&gt;&lt;td&gt;Thursday&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Fredag&lt;&#x2F;td&gt;&lt;td&gt;Friday&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Lørdag&lt;&#x2F;td&gt;&lt;td&gt;Saturday&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Søndag&lt;&#x2F;td&gt;&lt;td&gt;Sunday&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h2 id=&quot;conjugation&quot;&gt;Conjugation&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;personal-pronouns&quot;&gt;Personal pronouns&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Danish&lt;&#x2F;th&gt;&lt;th&gt;English&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;jeg&lt;&#x2F;td&gt;&lt;td&gt;I&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;du&lt;&#x2F;td&gt;&lt;td&gt;you&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;han &#x2F; hun &#x2F; den &#x2F; det&lt;&#x2F;td&gt;&lt;td&gt;he &#x2F; she &#x2F; it&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;vi&lt;&#x2F;td&gt;&lt;td&gt;we&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;i&lt;&#x2F;td&gt;&lt;td&gt;you&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;de&lt;&#x2F;td&gt;&lt;td&gt;they&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;infinitive&quot;&gt;Infinitive&lt;&#x2F;h3&gt;
&lt;p&gt;Most of the time finishing with &lt;strong&gt;-e&lt;&#x2F;strong&gt; and preceded by &lt;strong&gt;at&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Example : &lt;code&gt;at komme&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;present&quot;&gt;Present&lt;&#x2F;h3&gt;
&lt;p&gt;Most of the time finishing with &lt;strong&gt;-r&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Example : &lt;code&gt;jeg kommer&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;questions&quot;&gt;Questions&lt;&#x2F;h3&gt;
&lt;p&gt;To ask a question, invert subject and verb position in the sentence.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;negation&quot;&gt;Negation&lt;&#x2F;h3&gt;
&lt;p&gt;To use the negation use &lt;strong&gt;ikke&lt;&#x2F;strong&gt; after the verb.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;negative-questions&quot;&gt;Negative questions&lt;&#x2F;h3&gt;
&lt;p&gt;Construction : &lt;strong&gt;Verb + subject + ikke&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;modal-verbs&quot;&gt;Modal verbs&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;At skulle&lt;&#x2F;strong&gt; (should) :&lt;&#x2F;p&gt;
&lt;p&gt;Can be used to express the future.&lt;&#x2F;p&gt;
&lt;p&gt;Construction : &lt;strong&gt;Present form of at skulle + infinitive of main verb&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Example : &lt;code&gt;Jeg skal arbejde i weekenden&lt;&#x2F;code&gt; - I will work this weekend.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;At kunne&lt;&#x2F;strong&gt; (could&#x2F;know) :&lt;&#x2F;p&gt;
&lt;p&gt;Is used to express possibility and knowledge.&lt;&#x2F;p&gt;
&lt;p&gt;Example for possibility : &lt;code&gt;Jeg kan ikke komme i dag&lt;&#x2F;code&gt; - I can&#x27;t come today.&lt;&#x2F;p&gt;
&lt;p&gt;Example for knowledge : &lt;code&gt;Jeg kan tale dansk&lt;&#x2F;code&gt; - I can talk danish.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;At måtte&lt;&#x2F;strong&gt; (to be allowed to) :&lt;&#x2F;p&gt;
&lt;p&gt;Is used for :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Ask for a permission.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Construction : &lt;strong&gt;Må + subject + infinitive of the verb + object&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Example : &lt;code&gt;Må jegryge en cigaret ?&lt;&#x2F;code&gt; - Can i smoke a cigarette ?&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Express a logical obligation.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Example : &lt;code&gt;Det regner så jeg må tage bilen.&lt;&#x2F;code&gt; - It&#x27;s raining therefor I need to take the car.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;At burde&lt;&#x2F;strong&gt; (should) :&lt;&#x2F;p&gt;
&lt;p&gt;Is used to give advices.&lt;&#x2F;p&gt;
&lt;p&gt;Construction : &lt;strong&gt;Present form of at burde + infinitive of main verb&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Example : &lt;code&gt;Du bør arbejde mindre.&lt;&#x2F;code&gt; - You should work less.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Cistercian</title>
        <published>2021-12-10T00:00:00+00:00</published>
        <updated>2021-12-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/cistercian/"/>
        <id>https://duckpuck.net/projects/cistercian/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/cistercian/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;1993.png&quot; alt=&quot;dithered image of 1993 cistercian numeral&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;A couple of months ago I came across a post on Reddit talking about the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Cistercian_numerals&quot;&gt;Cistercian numerals&lt;&#x2F;a&gt;. I found the concept interesting and wanted to create a small script to generate all the numbers as a separated svg file.&lt;&#x2F;p&gt;
&lt;p&gt;The script generates the 9999 svg files usings &lt;a href=&quot;https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;SVG&#x2F;Element&#x2F;line&quot;&gt;lines&lt;&#x2F;a&gt; but there&#x27;s also a version of the same numerals using &lt;a href=&quot;https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;SVG&#x2F;Element&#x2F;path&quot;&gt;paths&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I might use the second one to create a font at some point. To create them I used &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;oslllo&#x2F;svg-fixer&quot;&gt;oslllo-svg-fixer&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Ruby http requests</title>
        <published>2021-11-26T00:00:00+00:00</published>
        <updated>2021-11-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/notes/ruby-http-queries/"/>
        <id>https://duckpuck.net/notes/ruby-http-queries/</id>
        
        <content type="html" xml:base="https://duckpuck.net/notes/ruby-http-queries/">
&lt;div class=&quot;image small-image&quot;&gt;
    &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;ruby.png&quot; alt=&quot;glitched logo of ruby&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h2 id=&quot;get-query-with-ssl&quot;&gt;GET query with ssl&lt;&#x2F;h2&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;require &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;net&#x2F;http&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;def &lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;perform_query&lt;&#x2F;span&gt;&lt;span&gt;(target_url)
&lt;&#x2F;span&gt;&lt;span&gt;  uri &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;URI&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;parse(target_url)
&lt;&#x2F;span&gt;&lt;span&gt;  http &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Net&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;HTTP&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new&lt;&#x2F;span&gt;&lt;span&gt;(uri&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;host&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; uri&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;port)
&lt;&#x2F;span&gt;&lt;span&gt;  http&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;use_ssl &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= true
&lt;&#x2F;span&gt;&lt;span&gt;  request &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Net&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;HTTP&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Get&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new&lt;&#x2F;span&gt;&lt;span&gt;(uri&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;request_uri)
&lt;&#x2F;span&gt;&lt;span&gt;  http&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;request(request)
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;end
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;get-query-with-headers&quot;&gt;GET query with headers&lt;&#x2F;h2&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;require &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;net&#x2F;http&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;def &lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;perform_query&lt;&#x2F;span&gt;&lt;span&gt;(target_url)
&lt;&#x2F;span&gt;&lt;span&gt;  uri &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;URI&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;parse(target_url)
&lt;&#x2F;span&gt;&lt;span&gt;  http &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Net&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;HTTP&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new&lt;&#x2F;span&gt;&lt;span&gt;(uri&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;host&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; uri&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;port)
&lt;&#x2F;span&gt;&lt;span&gt;  request &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Net&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;HTTP&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Get&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new&lt;&#x2F;span&gt;&lt;span&gt;(uri&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;request_uri)
&lt;&#x2F;span&gt;&lt;span&gt;  request[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;header-key&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;header-value&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;  http&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;request(request)
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;end
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Yoctolio</title>
        <published>2021-11-24T00:00:00+00:00</published>
        <updated>2021-11-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/yoctolio/"/>
        <id>https://duckpuck.net/projects/yoctolio/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/yoctolio/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;yoctolio.png&quot; alt=&quot;glitched logo of Yoctolio&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h2 id=&quot;backstory&quot;&gt;Backstory&lt;&#x2F;h2&gt;
&lt;p&gt;A couple of months ago my friend had the need for a quick web page containing a selection of his work. As the requirements was pretty simple I decided to create a small prototype directly in good&#x27;ol HTML + CSS, as all the videos featured on the website are hosted on YouTube this took me a couple of minutes and everyone was happy.&lt;&#x2F;p&gt;
&lt;p&gt;Now of course my friend kept on working and therefore producing more videos, videos that he wanted to showcase. Adding a small html snippet every time was of course not a problem but there was always a delay and that when I thought&lt;&#x2F;p&gt;
&lt;p&gt;&quot;Is there a way to over-engineer that process and to increase my Rust knowledge at the same time ?&quot;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;requirements&quot;&gt;Requirements&lt;&#x2F;h2&gt;
&lt;p&gt;To fit this use case Yoctolio needs to have the following features :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Display Youtube videos : ¯\_(ツ)_&#x2F;¯.&lt;&#x2F;li&gt;
&lt;li&gt;Compartmentation of videos : by categories and years inside those categories.&lt;&#x2F;li&gt;
&lt;li&gt;Tags for videos&lt;&#x2F;li&gt;
&lt;li&gt;Editable only with csv files : as my friend will add his videos I don&#x27;t want to use a markup language that he will need to learn just for this project.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;constraints&quot;&gt;Constraints&lt;&#x2F;h2&gt;
&lt;p&gt;Because this project is also about learning there are some self imposed constraints :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Written in Rust : as said before I wanted to learn a bit more of this language and a small project like this one is perfect for that.&lt;&#x2F;li&gt;
&lt;li&gt;Create a static site : there&#x27;s no need for a CMS here, I want to keep the first approach using HTML and CSS.&lt;&#x2F;li&gt;
&lt;li&gt;Create more than one page : it&#x27;s always good to have a little about page in there.&lt;&#x2F;li&gt;
&lt;li&gt;Having as few dependencies as possible : there&#x27;s no point in trying to learn a technologie if it&#x27;s to rely on an already made solution.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;getting-started&quot;&gt;Getting started&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;installation&quot;&gt;Installation&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;Using Cargo :&lt;&#x2F;strong&gt; &lt;code&gt;cargo install yoctolio&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;initialize-project&quot;&gt;Initialize project&lt;&#x2F;h3&gt;
&lt;p&gt;Once yoctolio installed you can run &lt;code&gt;yoctolio init&lt;&#x2F;code&gt; to initialize a new project.&lt;&#x2F;p&gt;
&lt;p&gt;After configurating everything to your liking you can simple run &lt;code&gt;yoctolio build&lt;&#x2F;code&gt; to compile your website.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;configuration&quot;&gt;Configuration&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;add-video-content&quot;&gt;Add video content&lt;&#x2F;h3&gt;
&lt;p&gt;The first step needed to add content on your portifolio is to create a file at the following path :
&lt;code&gt;config&#x2F;config.txt&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;As well as the &lt;code&gt;config&#x2F;tags.txt&lt;&#x2F;code&gt; file with the following content :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;csv&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-csv &quot;&gt;&lt;code class=&quot;language-csv&quot; data-lang=&quot;csv&quot;&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;, directing
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;, editing
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The words &lt;code&gt;directing&lt;&#x2F;code&gt; and &lt;code&gt;editing&lt;&#x2F;code&gt; can be changed and any tag can be added as long as their id (the number in front of the name) is uniq.&lt;&#x2F;p&gt;
&lt;p&gt;Inside this file you can now add one line per section on the index page of the portfolio :&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;Name of the section, file_name_of_the_section.txt&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Yoctolio will now generate a section called &lt;code&gt;Name of the section&lt;&#x2F;code&gt;, the videos you wish to include in this section need to be listed in the file you defined. In this case &lt;code&gt;config&#x2F;file_name_of_the_section.txt&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;To add a video you need to follow this pattern :&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;Name of the video, youtube_url, tag_number, year, description&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Where :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Name of the video&lt;&#x2F;code&gt; is self explenatory&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;youtube_url&lt;&#x2F;code&gt; is the full youtube url example : &lt;code&gt;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=79T8c0vW0ik&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;tag&lt;&#x2F;code&gt; the id of the tag of the video, to use multiple tags add &lt;code&gt;-&lt;&#x2F;code&gt; between two tags example &lt;code&gt;1-3&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;year&lt;&#x2F;code&gt; the year of the production example : &lt;code&gt;2021&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;description&lt;&#x2F;code&gt; a small explanation, the one is optional and can be left out&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;changing-the-template&quot;&gt;Changing the template&lt;&#x2F;h3&gt;
&lt;p&gt;The default templates are visible in &lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;yoctolio&#x2F;-&#x2F;tree&#x2F;main&#x2F;src&#x2F;templates&quot;&gt;the project repository&lt;&#x2F;a&gt;, to create your own you can simply create a &lt;code&gt;templates&lt;&#x2F;code&gt; folder with an &lt;code&gt;index.html&lt;&#x2F;code&gt; inside and it will be used by default.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;adding-a-page&quot;&gt;Adding a page&lt;&#x2F;h4&gt;
&lt;p&gt;If you want another page you can create a folder at the following path &lt;code&gt;templates&#x2F;pages&lt;&#x2F;code&gt; containing any html page that will be included in you portfolio.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;adding-assets&quot;&gt;Adding assets&lt;&#x2F;h4&gt;
&lt;p&gt;Whenever you want to include css, js, images or any asset to you projects you can simply create a folder at the following path &lt;code&gt;templates&#x2F;assets&lt;&#x2F;code&gt;, the content of this folder will be copied to &lt;code&gt;public&#x2F;assets&lt;&#x2F;code&gt; during compilation.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;adding-partials&quot;&gt;Adding partials&lt;&#x2F;h4&gt;
&lt;p&gt;A partial is a small html snippet that can be easilly reused in different pages and template, it can be useful for header, footer, navigation...&lt;&#x2F;p&gt;
&lt;p&gt;To add partials to your porfolio you need to create the folder &lt;code&gt;templates&#x2F;partials&lt;&#x2F;code&gt;, then inside create any html file. To call a partial from a page of the index.html you just have to include the following snippet : &lt;code&gt;{{!partial_name}}&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;So if you create &lt;code&gt;templates&#x2F;partials&#x2F;footer.html&lt;&#x2F;code&gt; it is called by using &lt;code&gt;{{!footer}}&lt;&#x2F;code&gt; in any template.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;live-reload&quot;&gt;Live reload&lt;&#x2F;h3&gt;
&lt;p&gt;When working on your templates you probably want to regenerate automatically the website as doing it manually can be quickly become annoying.&lt;&#x2F;p&gt;
&lt;p&gt;To do so I usually use &lt;a href=&quot;http:&#x2F;&#x2F;eradman.com&#x2F;entrproject&#x2F;&quot;&gt;entr&lt;&#x2F;a&gt; like that :&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;ls templates&#x2F;* | entr yoctolio build&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Shattered machine</title>
        <published>2021-11-23T00:00:00+00:00</published>
        <updated>2021-11-23T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/png-glitch-art-tools/shattered-machine/"/>
        <id>https://duckpuck.net/projects/png-glitch-art-tools/shattered-machine/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/png-glitch-art-tools/shattered-machine/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;shattered_machine.png&quot; alt=&quot;Glitched icon for shattered machine&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;The Shattered Machine is a gem that aim to create glitched png images easily.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;features&quot;&gt;Features&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Converter : Convert a single jpg images or a directory full of jpg image into png&lt;&#x2F;li&gt;
&lt;li&gt;Seven algorithms : Seven different algorithm with their own settings giving you lots of freedom to mess with your images&lt;&#x2F;li&gt;
&lt;li&gt;Sampler : Giving you a quick overview of all algorithms effect on your image&lt;&#x2F;li&gt;
&lt;li&gt;Folder glitching : Glitch easily all png images contained in a folder&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;usage-examples&quot;&gt;Usage&#x2F;Examples&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;glitcher&quot;&gt;Glitcher&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;require &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;shattered_machine&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;io &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;ShatteredMachine&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Io&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;input_image.png&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;output_folder&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;output_filename&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;ShatteredMachine&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Glitcher&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;Slim&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; io)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;call
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;sampler&quot;&gt;Sampler&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;require &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;shattered_machine&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;io &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;ShatteredMachine&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Io&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;input_image.png&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;output_folder&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;output_filename&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;ShatteredMachine&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Sampler&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new&lt;&#x2F;span&gt;&lt;span&gt;(io)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;call
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;converter&quot;&gt;Converter&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;require &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;shattered_machine&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;io &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;ShatteredMachine&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Io&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;input_image.jpg&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;output_folder&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;output_filename&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;ShatteredMachine&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Converter&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new&lt;&#x2F;span&gt;&lt;span&gt;(io)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;call
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;development&quot;&gt;Development&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;install-locally&quot;&gt;Install locally&lt;&#x2F;h3&gt;
&lt;p&gt;The Shattered Machine using two main libraries for glitching :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ucnv&#x2F;pnglitch&quot;&gt;pnglitch&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;rusty-engine&#x2F;&quot;&gt;rusty engine&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The rusty engine is written in rust and a compiled version for Windows, Mac os and Linux is already included in the gem.
To install the needed dependencies you need to install the &lt;a href=&quot;https:&#x2F;&#x2F;www.ruby-lang.org&#x2F;en&#x2F;&quot;&gt;Ruby language&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;bundler.io&#x2F;&quot;&gt;Bundler&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Then run &lt;code&gt;bundle install&lt;&#x2F;code&gt; to fetch the needed gems.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;create-new-version&quot;&gt;Create new version&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Fill the CHANGELOG with the changes contained in the new version&lt;&#x2F;li&gt;
&lt;li&gt;Ensure the specs are green&lt;&#x2F;li&gt;
&lt;li&gt;Change the versions in &lt;code&gt;lib&#x2F;shattered_machine.rb&lt;&#x2F;code&gt; and &lt;code&gt;shattered_machine.gemspec&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Create git tag&lt;&#x2F;li&gt;
&lt;li&gt;Compile the gem : &lt;code&gt;gem build shattered_machine.gemspec&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Push the new version : &lt;code&gt;gem push shattered_machine-x.x.x.gem&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;specs&quot;&gt;Specs&lt;&#x2F;h3&gt;
&lt;p&gt;This project uses &lt;a href=&quot;https:&#x2F;&#x2F;rspec.info&#x2F;&quot;&gt;Rspec&lt;&#x2F;a&gt; for writing specs, to run them simply run &lt;code&gt;bundle rspec&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;acknowledgements&quot;&gt;Acknowledgements&lt;&#x2F;h2&gt;
&lt;p&gt;This gem is relying heavily on the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ucnv&#x2F;pnglitch&quot;&gt;pnglitch gem&lt;&#x2F;a&gt; and the &lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;png-glitch&#x2F;rusty-engine&quot;&gt;rusty engine gem&lt;&#x2F;a&gt;.
The png image used in the specs has been created with &lt;a href=&quot;https:&#x2F;&#x2F;100r.co&#x2F;site&#x2F;ronin.html&quot;&gt;Ronin&lt;&#x2F;a&gt; while the jpg one is painting from Karl Wiener.
Icons made by &lt;a href=&quot;http:&#x2F;&#x2F;www.freepik.com&#x2F;&quot;&gt;Freepik&lt;&#x2F;a&gt; from &lt;a href=&quot;https:&#x2F;&#x2F;www.flaticon.com&#x2F;&quot;&gt;www.flaticon.com&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Tiny conveyor</title>
        <published>2021-11-23T00:00:00+00:00</published>
        <updated>2021-11-23T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/tiny-conveyor/"/>
        <id>https://duckpuck.net/projects/tiny-conveyor/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/tiny-conveyor/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;tiny_conveyor.png&quot; alt=&quot;Glitched icon for tiny conveyor&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;This gem is a tiny wrapper for &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;socketry&#x2F;async&quot;&gt;async&lt;&#x2F;a&gt; that can create and execute a queue of tasks, each of the task run in a separated thread.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;setup&quot;&gt;Setup&lt;&#x2F;h2&gt;
&lt;p&gt;To use this gem you can simply install it with gem :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;gem&lt;&#x2F;span&gt;&lt;span&gt; install tiny_conveyor
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;or add the following line to your Gemfile :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;gem &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;tiny_conveyor&amp;#39;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;instantiation&quot;&gt;Instantiation&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;require &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;tiny_conveyor&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;conveyor &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;TinyConveyor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;run-task&quot;&gt;Run task&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span&gt;action &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#88c0d0;&quot;&gt;proc &lt;&#x2F;span&gt;&lt;span&gt;{ &lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#88c0d0;&quot;&gt;puts &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;Run in a separated thread&amp;#39; &lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;span&gt;conveyor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;add_parcel(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;first action&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;a simple task that print a sentence&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; action)
&lt;&#x2F;span&gt;&lt;span&gt;conveyor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;start_belt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;remove-unstarted-task&quot;&gt;Remove unstarted task&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span&gt;conveyor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;remove_parcel_by_uuid(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;uuid_of_the_parcel&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;check-if-a-task-is-running&quot;&gt;Check if a task is running&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span&gt;conveyor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;running?
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;check-current-pending-tasks&quot;&gt;Check current pending tasks&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span&gt;conveyor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;parcels
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;acknowledgements&quot;&gt;Acknowledgements&lt;&#x2F;h2&gt;
&lt;p&gt;Icons made by xnimrodx from &lt;a href=&quot;https:&#x2F;&#x2F;www.flaticon.com&#x2F;&quot;&gt;flaticon&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Rusty engine</title>
        <published>2021-11-22T00:00:00+00:00</published>
        <updated>2021-11-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/png-glitch-art-tools/rusty-engine/"/>
        <id>https://duckpuck.net/projects/png-glitch-art-tools/rusty-engine/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/png-glitch-art-tools/rusty-engine/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;rusty_engine.png&quot; alt=&quot;Glitched icon for rusty engine&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;This project is a tiny image manipulation library with four different functions and provides an efficient way to perform CPU intensive tasks.&lt;&#x2F;p&gt;
&lt;p&gt;It&#x27;s written in Rust but is precompiled for Linux, macos and windows that can be called from a Ruby file through FFI.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;ruby-setup&quot;&gt;Ruby setup&lt;&#x2F;h2&gt;
&lt;p&gt;The project is already precompiled in three different c libraries (stored in &lt;code&gt;lib&#x2F;bin&lt;&#x2F;code&gt;) :&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;librusty_engine.dll (windows)&lt;&#x2F;li&gt;
&lt;li&gt;librusty_engine.dylib (macos)&lt;&#x2F;li&gt;
&lt;li&gt;librusty_engine.so (linux)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Therefore if you want to use it in a ruby script you can simply install the &lt;code&gt;rusty_engine&lt;&#x2F;code&gt; gem and simply &lt;code&gt;require &#x27;rusty_engine_ffi&#x27;&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;converter&quot;&gt;Converter&lt;&#x2F;h3&gt;
&lt;p&gt;Example :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;require &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;rusty_engine_ffi&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;RustyEngine&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;convert(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;images&#x2F;input.jpg&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;images&#x2F;output.jpg&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Arguments :&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;input file path&lt;&#x2F;li&gt;
&lt;li&gt;output path file&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;slim&quot;&gt;Slim&lt;&#x2F;h3&gt;
&lt;p&gt;Example :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;require &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;rusty_engine_ffi&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;RustyEngine&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;slim(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;images&#x2F;input.jpg&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;images&#x2F;output.jpg&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;90&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;global&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;3&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;red&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;99&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Arguments :&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;input file path&lt;&#x2F;li&gt;
&lt;li&gt;output path file&lt;&#x2F;li&gt;
&lt;li&gt;probability&lt;&#x2F;li&gt;
&lt;li&gt;probability area&lt;&#x2F;li&gt;
&lt;li&gt;direction&lt;&#x2F;li&gt;
&lt;li&gt;colors&lt;&#x2F;li&gt;
&lt;li&gt;colors probabilities&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;brush&quot;&gt;Brush&lt;&#x2F;h3&gt;
&lt;p&gt;Example :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;require &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;rusty_engine_ffi&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;RustyEngine&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;brush(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;images&#x2F;input.jpg&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;images&#x2F;output.jpg&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;90&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;5&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;10&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;2&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Arguments :&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;input file path&lt;&#x2F;li&gt;
&lt;li&gt;output path file&lt;&#x2F;li&gt;
&lt;li&gt;probability&lt;&#x2F;li&gt;
&lt;li&gt;min&lt;&#x2F;li&gt;
&lt;li&gt;max&lt;&#x2F;li&gt;
&lt;li&gt;direction&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;pixel-sorting&quot;&gt;Pixel sorting&lt;&#x2F;h3&gt;
&lt;p&gt;Example :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;require &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;rusty_engine_ffi&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;RustyEngine&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;sort(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;images&#x2F;input.jpg&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;images&#x2F;output.jpg&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;1&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;true&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;0&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;0&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;30&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;true&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;60&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;100&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;0&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Arguments :&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;input file path&lt;&#x2F;li&gt;
&lt;li&gt;output path file&lt;&#x2F;li&gt;
&lt;li&gt;smart sorting&lt;&#x2F;li&gt;
&lt;li&gt;detection type&lt;&#x2F;li&gt;
&lt;li&gt;min&lt;&#x2F;li&gt;
&lt;li&gt;max&lt;&#x2F;li&gt;
&lt;li&gt;multiple range&lt;&#x2F;li&gt;
&lt;li&gt;min 2&lt;&#x2F;li&gt;
&lt;li&gt;max 2&lt;&#x2F;li&gt;
&lt;li&gt;sorting by&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;development&quot;&gt;Development&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;project-architecture&quot;&gt;Project architecture&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;src&#x2F;&lt;&#x2F;code&gt; contains the Rust code&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;target&#x2F;&lt;&#x2F;code&gt; contains the compiled rust code (this directory is not present in git)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;lib&#x2F;&lt;&#x2F;code&gt; contains the files included in the gem&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;lib&#x2F;bin&#x2F;&lt;&#x2F;code&gt; contains the compiled rust libraries for osx, linux and windows&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;lib&#x2F;rusty_engine.rb&lt;&#x2F;code&gt; is the ruby file that uses FFI to call the libraries inside &lt;code&gt;lib&#x2F;bin&#x2F;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;compilation&quot;&gt;Compilation&lt;&#x2F;h3&gt;
&lt;p&gt;To compile this project you need the following softwares installed on you machine :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.rust-lang.org&#x2F;tools&#x2F;install&quot;&gt;Rust and Cargo&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.docker.com&#x2F;&quot;&gt;Docker&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rust-embedded&#x2F;cross&quot;&gt;Cross&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;For compiling the rust code for your architecture :
&lt;code&gt;cargo build --release&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;For cross compilation, use cross :&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Windows&lt;&#x2F;strong&gt;
&lt;code&gt;cross build --release --target x86_64-pc-windows-gnu&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Linux&lt;&#x2F;strong&gt;
&lt;code&gt;cross build --release --target x86_64-unknown-linux-gnu&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The compiled library is now available in the &lt;code&gt;target&#x2F;release&#x2F;&lt;&#x2F;code&gt; directory.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;icon&quot;&gt;Icon&lt;&#x2F;h2&gt;
&lt;p&gt;Icons made by &lt;a href=&quot;http:&#x2F;&#x2F;www.freepik.com&#x2F;&quot;&gt;Freepik&lt;&#x2F;a&gt; from &lt;a href=&quot;https:&#x2F;&#x2F;www.flaticon.com&#x2F;&quot;&gt;www.flaticon.com&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Piddly</title>
        <published>2021-11-21T00:00:00+00:00</published>
        <updated>2021-11-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/archive/piddly/"/>
        <id>https://duckpuck.net/archive/piddly/</id>
        
        <content type="html" xml:base="https://duckpuck.net/archive/piddly/">&lt;p&gt;After realizing I always used the same set of CSS rules for a new project it&#x27;s easier to just create some kind of skeleton app that can be reused.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;inspiration&quot;&gt;Inspiration&lt;&#x2F;h2&gt;
&lt;p&gt;The rules from this css file are higly inspired (or stolen, as you want) from the following projects :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http:&#x2F;&#x2F;getskeleton.com&#x2F;&quot;&gt;Skeleton&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;necolas.github.io&#x2F;normalize.css&#x2F;&quot;&gt;Normalize&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;meta.stackexchange.com&#x2F;questions&#x2F;364048&#x2F;we-are-switching-to-system-fonts-on-may-10-2021&quot;&gt;Stack exchange&#x27;s font rules&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;endtimes.dev&#x2F;til&#x2F;emojis-as-favicons&#x2F;&quot;&gt;Emoji as favicon trick&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Three monkeys</title>
        <published>2021-11-20T00:00:00+00:00</published>
        <updated>2021-11-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/archive/three-monkeys/"/>
        <id>https://duckpuck.net/archive/three-monkeys/</id>
        
        <content type="html" xml:base="https://duckpuck.net/archive/three-monkeys/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;monkeys.png&quot; alt=&quot;glitched picture of Suzanne&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;A small in browser .obj viewer and manipulation tool created with &lt;a href=&quot;https:&#x2F;&#x2F;threejs.org&#x2F;&quot;&gt;ThreeJS&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;This project was created for a website of a design studio, originally the two faces were the ones of the members of this studio, but for this archived version of the project I decided to replace them by the good old Suzanne from &lt;a href=&quot;https:&#x2F;&#x2F;www.blender.org&#x2F;&quot;&gt;Blender&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>(legacy) Glitched factory</title>
        <published>2021-11-20T00:00:00+00:00</published>
        <updated>2021-11-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/png-glitch-art-tools/legacy-glitched-factory/"/>
        <id>https://duckpuck.net/projects/png-glitch-art-tools/legacy-glitched-factory/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/png-glitch-art-tools/legacy-glitched-factory/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;legacy_glitched_factory.png&quot; alt=&quot;legacy glitch factory logo&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h2 id=&quot;about&quot;&gt;About&lt;&#x2F;h2&gt;
&lt;p&gt;This project contains the code for compiling the GlitchedFactory as well as the current version of the binaries (windows, linux and osx). To get an older version you can find them in the git repo.&lt;&#x2F;p&gt;
&lt;p&gt;This project is created using Shoes.
Since Shoes is now an abandonware this project will not be continued but a new version is in progress of rewritting using Glimmer.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specs&quot;&gt;Specs&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;initialization&quot;&gt;Initialization&lt;&#x2F;h3&gt;
&lt;p&gt;You need Rspec to run the specs for the project, to install it run &lt;code&gt;bundle install&lt;&#x2F;code&gt; in the root folder.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;running&quot;&gt;Running&lt;&#x2F;h3&gt;
&lt;p&gt;To run the specs simply run the following command &lt;code&gt;bundle exec rspec&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;compile-the-project&quot;&gt;Compile the project&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;linux&quot;&gt;Linux&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;deb-package&quot;&gt;.deb package&lt;&#x2F;h4&gt;
&lt;p&gt;For creating a .deb package you need to copy &lt;code&gt;script&#x2F;utils&#x2F;merge-lin.rb&lt;&#x2F;code&gt; inside &lt;code&gt;~&#x2F;.shoes&#x2F;package&#x2F;&lt;&#x2F;code&gt; on the linux setup then run the following commands from the root folder of glitched factory:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;scp&lt;&#x2F;span&gt;&lt;span&gt; script&#x2F;utils&#x2F;linux_packager.sh user@host:linux_packager.sh
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;ssh&lt;&#x2F;span&gt;&lt;span&gt; user@host:
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;.&#x2F;linux_packager.sh
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;osx&quot;&gt;OSX&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span&gt; script&#x2F;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span&gt; dmg
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span&gt; dmg
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;ruby&lt;&#x2F;span&gt;&lt;span&gt; ..&#x2F;utils&#x2F;dmg_packager_osx.rb ..&#x2F;utils&#x2F;dmg_info_osx.yml
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;window&quot;&gt;Window&lt;&#x2F;h3&gt;
&lt;p&gt;Copy &lt;code&gt;script&#x2F;utils&#x2F;compile_glitched_factory.bat&lt;&#x2F;code&gt; to the vm and run it as administrator&lt;&#x2F;p&gt;
&lt;h2 id=&quot;create-new-release&quot;&gt;Create new release&lt;&#x2F;h2&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span&gt; script
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;.&#x2F;create_new_version.sh &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span&gt;version number&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Thrived</title>
        <published>2021-11-19T00:00:00+00:00</published>
        <updated>2021-11-19T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/archive/thrived/"/>
        <id>https://duckpuck.net/archive/thrived/</id>
        
        <content type="html" xml:base="https://duckpuck.net/archive/thrived/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;thrived.png&quot; alt=&quot;glitched picture of Thrived cover&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;For the album cover of &lt;a href=&quot;https:&#x2F;&#x2F;thrived.bandcamp.com&#x2F;album&#x2F;thrived-anthea&quot;&gt;their EP Anthea&lt;&#x2F;a&gt;, the band Thrived decided to generate an image of a flower using an AI. To train this AI they asked their listeners to pick an image of a flower among a preselected set and to crop it as they wanted.&lt;&#x2F;p&gt;
&lt;p&gt;This project is the website that allows the selection and cropping of the images. It was quickly developed because of the scheduled release date so the technologies used are not top notch but something that allowed me quick prototyping (flask and jquery).&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Datamosher</title>
        <published>2021-11-18T00:00:00+00:00</published>
        <updated>2021-11-18T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/archive/datamosher/"/>
        <id>https://duckpuck.net/archive/datamosher/</id>
        
        <content type="html" xml:base="https://duckpuck.net/archive/datamosher/">&lt;p&gt;This project was an attempt to create a small gui around &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ucnv&#x2F;aviglitch&quot;&gt;aviglitch&lt;&#x2F;a&gt; using Shoes.
Since Shoes is now an abandonware this project will not be continued.&lt;&#x2F;p&gt;
&lt;p&gt;Aviglitch is a great little library created by the same author as &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ucnv&#x2F;pnglitch&quot;&gt;pnglitch&lt;&#x2F;a&gt; and allows a quick and easy way to create &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Compression_artifact#Artistic_use&quot;&gt;datamoshed videos&lt;&#x2F;a&gt; by destroying oon purpose the .avi format.&lt;&#x2F;p&gt;
&lt;p&gt;This is still an area that interests me and I will probably (one day...) create another version of this tool. Unfortunately this library is written in Ruby, at first it was great because it allowed me to quickly understand it and play with it but Ruby is not made for creating small and portable binaries. Therefore to create an interesting software that can be easily distributed this library should be rewritten in a compiled language.&lt;&#x2F;p&gt;
&lt;p&gt;At the moment I&#x27;m thinking about Rust to do this job but that can always change as long as I didn&#x27;t start to work on it.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Gitlab search engine</title>
        <published>2021-11-18T00:00:00+00:00</published>
        <updated>2021-11-18T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/gitlab-search-engine/"/>
        <id>https://duckpuck.net/projects/gitlab-search-engine/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/gitlab-search-engine/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;gitlab.png&quot; alt=&quot;Glitched logo of gitlab&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;This repository contains the work done for the dissertation module of my MSc in computer science at the Oxford Brookes University, including a search engine written in Haskell using the &lt;a href=&quot;https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;scotty&quot;&gt;Scotty web framework&lt;&#x2F;a&gt; and several documents created alongside the engine.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;documentation&quot;&gt;Documentation&lt;&#x2F;h2&gt;
&lt;p&gt;The documents are :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;doc&#x2F;Dissertation%20Proposal.pdf&quot;&gt;Dissertation proposal&lt;&#x2F;a&gt; : Created after the development stage, describe the future project.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;doc&#x2F;Interim%20Report.pdf&quot;&gt;Interim Report&lt;&#x2F;a&gt; : A mid-term document explaining the current state of the project.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;doc&#x2F;Presentation.pdf&quot;&gt;Presentation&lt;&#x2F;a&gt; : A support for the oral presentation.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;doc&#x2F;Short%20paper.pdf&quot;&gt;Short paper&lt;&#x2F;a&gt; : A small document that linger over the scientific side of the project.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;doc&#x2F;Final%20Report.pdf&quot;&gt;Final report&lt;&#x2F;a&gt; : The larger document explaining the creation process of the entire project.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Each of these documents can be viewed in their raw formats (LaTex or Mardown).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;The goal of this dissertation is to create a search engine capable of gathering information autonomously about open source projects hosted on several Gitlab servers, and retrieve this information to fit a search query performed by a user while being the most accurate and quick as possible.
A literature review is conducted about the Trie and B-tree data structures and their efficiency within the scope of search engines as well as a study of the current state of web Git servers.
Finally the main decisions taken during the development process will be explained.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;search-engine&quot;&gt;Search Engine&lt;&#x2F;h2&gt;
&lt;p&gt;The search engine is composed by the following scripts :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;src&#x2F;CustomTypes.hs&quot;&gt;CustomTypes.hs&lt;&#x2F;a&gt; : Containing each type declaration and functions related to them.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;src&#x2F;DbSql.hs&quot;&gt;DbSql.hs&lt;&#x2F;a&gt; : Containing every CRUD function for the SQL database.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;src&#x2F;JSONParser.hs&quot;&gt;JSONParser.hs&lt;&#x2F;a&gt; : Containing functions for JSON parsing (JSON files are created from Gitlab API response).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;src&#x2F;Main.hs&quot;&gt;Main.hs&lt;&#x2F;a&gt; : Containing the Scotty routing and templates functions.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;src&#x2F;Query.hs&quot;&gt;Query.hs&lt;&#x2F;a&gt; : Containing function for creating JSON files by querying Gitlab&#x27;s API.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;src&#x2F;Research.hs&quot;&gt;Research.hs&lt;&#x2F;a&gt; : Containing search functions used for the comparison between SQL and Trie performances.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;src&#x2F;Session.hs&quot;&gt;Session.hs&lt;&#x2F;a&gt; : Containing functions creating and managing the Scotty&#x27;s sessions.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;src&#x2F;TestDb.hs&quot;&gt;TestDb.hs&lt;&#x2F;a&gt; : Containing benchmark creation functions.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;gitlab_search_engine&#x2F;-&#x2F;blob&#x2F;master&#x2F;src&#x2F;Trie.hs&quot;&gt;Trie.hs&lt;&#x2F;a&gt; : Containing every CRUD function for the Trie.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title> PNG glitcher</title>
        <published>2021-11-18T00:00:00+00:00</published>
        <updated>2021-11-18T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/png-glitch-art-tools/png-glitcher/"/>
        <id>https://duckpuck.net/projects/png-glitch-art-tools/png-glitcher/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/png-glitch-art-tools/png-glitcher/">&lt;h2 id=&quot;goal&quot;&gt;Goal&lt;&#x2F;h2&gt;
&lt;p&gt;This project is composed by three scripts created with &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ucnv&#x2F;pnglitch&quot;&gt;pnglitch&lt;&#x2F;a&gt;, each of them can be used to create glitched version of a png image :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;glitch_sample.rb : create a folder &lt;code&gt;glitched&lt;&#x2F;code&gt; containing an image for each glitch algorithm.&lt;&#x2F;li&gt;
&lt;li&gt;glitch_directory.rb : create an glitched version of every images contained by a directory.&lt;&#x2F;li&gt;
&lt;li&gt;glitch_animation.rb : create an animate (.gif) from a .png image&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;requirements&quot;&gt;Requirements&lt;&#x2F;h2&gt;
&lt;p&gt;In order to use this project you need the following software installed on your computer :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;ffmpeg.org&#x2F;&quot;&gt;ffmpeg&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.ruby-lang.org&#x2F;en&#x2F;&quot;&gt;ruby&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;glitch-sample-rb&quot;&gt;glitch_sample.rb&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;Usage: glitch_sample.rb [options]
&lt;&#x2F;span&gt;&lt;span&gt;    -i, --input I                    Input png file (default: image.png)
&lt;&#x2F;span&gt;&lt;span&gt;    -v, --verbose                    Run verbosely
&lt;&#x2F;span&gt;&lt;span&gt;    -h, --help                       Show this message
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;glitch-directory-rb&quot;&gt;glitch_directory.rb&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;Usage: glitch_directory.rb [options]
&lt;&#x2F;span&gt;&lt;span&gt;    -i, --input-folder I             Input folder storing png imges to glitch (default: input)
&lt;&#x2F;span&gt;&lt;span&gt;    -v, --verbose                    Run verbosely
&lt;&#x2F;span&gt;&lt;span&gt;        --random                     Add a random factor to the generated glitch (works with exchange algorithm)
&lt;&#x2F;span&gt;&lt;span&gt;        --glitch-folder F            Name of the folder where the glitched images are stored (default: glitched)
&lt;&#x2F;span&gt;&lt;span&gt;        --frames F                   F glitched frames created (default: 1)
&lt;&#x2F;span&gt;&lt;span&gt;        --filter FILTER              Select glitching filter :
&lt;&#x2F;span&gt;&lt;span&gt;                                       (none,sub,up,average,paeth,random) (default: sub)
&lt;&#x2F;span&gt;&lt;span&gt;        --algorithm ALGORITHM        Select glitching algorithm :
&lt;&#x2F;span&gt;&lt;span&gt;                                       (exchange ,transpose) (default: exchange)
&lt;&#x2F;span&gt;&lt;span&gt;        --range R                    Range of the glitch area (0 for full range, default: 0)
&lt;&#x2F;span&gt;&lt;span&gt;    -h, --help                       Show this message
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;glitch-animation-rb&quot;&gt;glitch_animation.rb&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;Usage: glitch_animation.rb [options]
&lt;&#x2F;span&gt;&lt;span&gt;    -i, --input I                    Input png file (default: image.png)
&lt;&#x2F;span&gt;&lt;span&gt;    -o, --output O                   Output gif file (default: output.gif)
&lt;&#x2F;span&gt;&lt;span&gt;    -v, --verbose                    Run verbosely
&lt;&#x2F;span&gt;&lt;span&gt;        --random                     Add a random factor to the generated glitch (works with exchange algorithm)
&lt;&#x2F;span&gt;&lt;span&gt;        --glitch-name N              Name of the glitched image created (default: glitch)
&lt;&#x2F;span&gt;&lt;span&gt;        --glitch-folder F            Name of the folder where the glitched images are stored (default: glitched)
&lt;&#x2F;span&gt;&lt;span&gt;        --full-glitch                create a gif with only glitched images
&lt;&#x2F;span&gt;&lt;span&gt;        --frames F                   F glitched frames created (default: 1)
&lt;&#x2F;span&gt;&lt;span&gt;        --delay D                    D ticks between each frames (1s is 100 ticks, default: 2)
&lt;&#x2F;span&gt;&lt;span&gt;        --first_delay D              D ticks after the first frame (default: 300)
&lt;&#x2F;span&gt;&lt;span&gt;        --filter FILTER              Select glitching filter :
&lt;&#x2F;span&gt;&lt;span&gt;                                       (none ,sub ,up ,average ,paeth ,random ,random_consistent) (default: sub)
&lt;&#x2F;span&gt;&lt;span&gt;        --algorithm ALGORITHM        Select glitching algorithm :
&lt;&#x2F;span&gt;&lt;span&gt;                                       (exchange ,transpose) (default: exchange)
&lt;&#x2F;span&gt;&lt;span&gt;        --range R                    Range of the glitch area (0 for full range, default: 0)
&lt;&#x2F;span&gt;&lt;span&gt;    -h, --help                       Show this message
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;examples&quot;&gt;Examples&lt;&#x2F;h2&gt;
&lt;p&gt;An animation and several glitched images can be found in the &lt;code&gt;images&lt;&#x2F;code&gt; directory.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>µjava compiler</title>
        <published>2021-11-17T00:00:00+00:00</published>
        <updated>2021-11-17T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/ujava-compiler/"/>
        <id>https://duckpuck.net/projects/ujava-compiler/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/ujava-compiler/">&lt;p&gt;This repository contain two different projects :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;A compiler for the µjava language written in java&lt;&#x2F;li&gt;
&lt;li&gt;Two &lt;a href=&quot;http:&#x2F;&#x2F;www.ssw.uni-linz.ac.at&#x2F;Coco&#x2F;&quot;&gt;Coco&lt;&#x2F;a&gt; configuration files, those files will not be explained as their importance and complexity are rather low compared to the compiler.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;This project was created during my studies, which means that I will not work more on this but I wish to keep it for future references if needed.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;ujava-compiler&quot;&gt;µjava Compiler&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;em&gt;A complete documentation with explanations on the implementation of the result of the tests can be found &lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;compiler&#x2F;-&#x2F;blob&#x2F;master&#x2F;Doc&#x2F;P00488%20Compiler%20Construction.pdf&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The compiler can be found in the Code&#x2F;Compiler&#x2F; directory. The goal of this software is to be able to read and parse µjava files in order to create bytecode files that can be executed.&lt;&#x2F;p&gt;
&lt;p&gt;The compiler is composed of two main components.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;scanner&quot;&gt;Scanner&lt;&#x2F;h3&gt;
&lt;p&gt;The goal of the scanner is to be able to read a file, detect each character written in the file and be able to distinguish them. However this compiler aims to compile μjava code meaning that the scanner has to understand only the syntax of this language therefore should return an error when the scanned text contains any non μjava character.&lt;&#x2F;p&gt;
&lt;p&gt;Furthermore it should be able to differentiate the keywords of the scanned code as such so it needs to translate the content of the scanned file into several tokens. A token is a scanned bit of code, it could be a number or a letter but can also be any identifier like ’if’, ’else’...&lt;&#x2F;p&gt;
&lt;p&gt;The proper functioning of the scanner will be tested with the help of the given java class named TestScanner available in the TestData directory. The purpose of this script is simply to run the scanner on an input file then print some information returned by the scanner.&lt;&#x2F;p&gt;
&lt;p&gt;For each detected token the information will be the following :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The line on which the token has been detected.&lt;&#x2F;li&gt;
&lt;li&gt;The column on which it starts.&lt;&#x2F;li&gt;
&lt;li&gt;The kind of the token.&lt;&#x2F;li&gt;
&lt;li&gt;The value of the token.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The TestScanner script is going to print a formatted version of that information. For example when the scanner detect a semicolon at the line 1 column 1 this is the expected output :&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;line 1, col 1: ;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;As the scanner returns the kind of the token using keywords the test script is able to translate it on the corresponding character. For the previous example the scanner would return ’semicolon’ as the kind of token. Finally when the token is a number or an identifier the value of the token will be printed, for example :&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;line 2, col 1: number 5
&lt;&#x2F;span&gt;&lt;span&gt;line 3, col 5: ident size
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h4 id=&quot;tests&quot;&gt;Tests&lt;&#x2F;h4&gt;
&lt;p&gt;This part as been tested with three different provided input files :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;sample.mj : This file contains a syntactically correct μjava program, the test should return a formatted line for each token of the program as shown before.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Eratos.mj : Again this file is a working μjava program, therefore the wanted output is the same kind as sample.mj.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;BuggyScannerInput.mj : This time the file is deliberately incorrect. The first part of the file doesn’t contain any error therefore should be scanned like the two previous files. On the other hand, it’s finished by six errors that need to be smartly handled by the scanner which imply to read the full document without crashing and report the correct number of errors and their positions. The scanner is expected to return four kind of error messages for the BuggyScannerInput.mj :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;”Overflow” for the illegal number.&lt;&#x2F;li&gt;
&lt;li&gt;”Apostrophe missing” for the illegal character constants with only one apostrophe.&lt;&#x2F;li&gt;
&lt;li&gt;”Unknown character” for the unknown token.&lt;&#x2F;li&gt;
&lt;li&gt;”Invalid character” for the three remaining illegal character constants.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;By testing the scanner with the three files we can be confident in the good working state of the scanner. The content of those files are available in the appendices of this document.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;parser&quot;&gt;Parser&lt;&#x2F;h3&gt;
&lt;p&gt;The second part of this compiler is the parser which needs to fulfill two different tasks. The symbol table is going to store and retrieve all declared names and properties of the μjava program being parsed.&lt;&#x2F;p&gt;
&lt;p&gt;The parser should therefore be able to add a new entry in the table anytime the program declares one with it’s properties but also be capable of fetching it whenever the program calls it.&lt;&#x2F;p&gt;
&lt;p&gt;μjava like most programming languages uses scopes for variables, our symbol table should then be able to store the corresponding scope for each stored variable. This will be imperative when the code is going to be executed by the μjava virtual machine.&lt;&#x2F;p&gt;
&lt;p&gt;Finally once the table management is done we want the parser to be able to generate machine instructions, in our case μjava virtual machine bytecodes.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;tests-1&quot;&gt;Tests&lt;&#x2F;h4&gt;
&lt;p&gt;This part as been tested with three different provided input files :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;sample.mj : Here again as this program is correct our parser should be able to generate the content of the file and compile it.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Eratos.mj : Like for sample.mj the parser should be able to parse it and compile it without any error.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;BuggyParserInput.mj : Like for the scanner this file is intentionally incorrect and should produce several errors. We also need the parser to be able to read the entire file and don’t stop when encountering an error as we want to inform the user of all errors in only one run. The program contains eight errors that should be returned by the parser. Their are only four different kind of errors and therefore error messages that should be returned :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;””{” expected” In this case the brace is only an example as we need to handle every missing character of the program.&lt;&#x2F;li&gt;
&lt;li&gt;”invalid assignment or call” This occurs when the program uses an assignment or call symbol that is not recognised by the μjava syntax.&lt;&#x2F;li&gt;
&lt;li&gt;”invalid expression” Should be returned every time an expression in invalid, like a function call without an attribute.&lt;&#x2F;li&gt;
&lt;li&gt;”incompatible type in assignment” Should be returned when the type of the value is not compatible with the type of the variable in an assignment.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Tetris</title>
        <published>2021-11-16T00:00:00+00:00</published>
        <updated>2021-11-16T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/projects/tetris/"/>
        <id>https://duckpuck.net/projects/tetris/</id>
        
        <content type="html" xml:base="https://duckpuck.net/projects/tetris/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;tetris.png&quot; alt=&quot;glitched picture of Tetris&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;The goal of this project is to create two versions of the game Tetris in two different paradigms:
imperative and functional. The two programming languages chosen for this task are respectively Java and Haskell.&lt;&#x2F;p&gt;
&lt;p&gt;This project was created during my studies, which means that I will not work more on this but I wish to keep it for future references if needed.&lt;&#x2F;p&gt;
&lt;p&gt;A document containing a complete explanation of the choices made for this project as well as a detailed comparison of the two programs using a compiler can be found in the &lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;girflo&#x2F;tetris&#x2F;-&#x2F;blob&#x2F;master&#x2F;Doc&#x2F;Tetris.pdf&quot;&gt;Doc&#x2F; diretory&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what-is-tetris&quot;&gt;What is Tetris&lt;&#x2F;h2&gt;
&lt;p&gt;For the few that don&#x27;t know this game, Tetris is a cult puzzle type video game created by Alexey Pajitnov in 1984. The goal of the game is to create horizontal lines organizing small pieces together. Those pieces are called tetrominos.&lt;&#x2F;p&gt;
&lt;p&gt;The available tetrominos will be called by the following names in this document:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;i-tetromino&lt;&#x2F;li&gt;
&lt;li&gt;o-tetromino&lt;&#x2F;li&gt;
&lt;li&gt;t-tetromino&lt;&#x2F;li&gt;
&lt;li&gt;j-tetromino&lt;&#x2F;li&gt;
&lt;li&gt;l-tetromino&lt;&#x2F;li&gt;
&lt;li&gt;z-tetromino&lt;&#x2F;li&gt;
&lt;li&gt;s-tetromino&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Each tetromino is a layout of four blocks.
The game will create one of those tetrominos and make it go down a 20&#x2F;10 matrix, during the fall the user can change the tetromino’s orientation and it’s position but once it reach the bottom of the matrix or another tetromino it will be fixed.
Finally if one horizontal line is full of blocks it will disappear and give the user some points.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;features&quot;&gt;Features&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;tetrominos&quot;&gt;Tetrominos&lt;&#x2F;h3&gt;
&lt;p&gt;The program should be able to randomly choose between one of the seven tetrominos. The current tetromino should move one square to the right or to the left when the user presses a specific key.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;blocks&quot;&gt;Blocks&lt;&#x2F;h3&gt;
&lt;p&gt;Each tetromino is composed of four blocks, those blocks need to act independently. The main reason is that when a line is completed we don’t want the entire tetromino to disappear but only the block contains on the line. That’s why when a tetromino is fixed we need the program to take only into account blocks.&lt;&#x2F;p&gt;
&lt;p&gt;Nonetheless when the tetromino is still moving the block should behave as a whole.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;matrix&quot;&gt;Matrix&lt;&#x2F;h3&gt;
&lt;p&gt;The program needs to create the matrix of the game of the user; this matrix will have twenty horizontal lines and ten vertical ones.&lt;&#x2F;p&gt;
&lt;p&gt;The matrix needs to show the fixed tetrominos, the current one which can be laterally moved and which direction can be switched by the user.&lt;&#x2F;p&gt;
&lt;p&gt;When the user fills an entire horizontal line it should disappear and when a vertical one is filled the
game must stop.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;drop&quot;&gt;Drop&lt;&#x2F;h3&gt;
&lt;p&gt;Every x seconds the current falling piece should drop 1 cell vertically. The value of x is defined by the current level.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;level&quot;&gt;Level&lt;&#x2F;h3&gt;
&lt;p&gt;Each time the user reachs 10 000 points the game changes the level which means that the falling speed of the current tetromino will be increased.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;score&quot;&gt;Score&lt;&#x2F;h3&gt;
&lt;p&gt;Following the original Nintendo scoring system here are the scores :&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Level&lt;&#x2F;th&gt;&lt;th&gt;1 line&lt;&#x2F;th&gt;&lt;th&gt;2 lines&lt;&#x2F;th&gt;&lt;th&gt;3 lines&lt;&#x2F;th&gt;&lt;th&gt;4 lines&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;1&lt;&#x2F;td&gt;&lt;td&gt;40&lt;&#x2F;td&gt;&lt;td&gt;100&lt;&#x2F;td&gt;&lt;td&gt;300&lt;&#x2F;td&gt;&lt;td&gt;1200&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;n&lt;&#x2F;td&gt;&lt;td&gt;40 * (n + 1)&lt;&#x2F;td&gt;&lt;td&gt;100 * (n + 1)&lt;&#x2F;td&gt;&lt;td&gt;300 * (n + 1)&lt;&#x2F;td&gt;&lt;td&gt;1200 * (n + 1)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Each 1000 point the game level is upgraded.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;gravity&quot;&gt;Gravity&lt;&#x2F;h3&gt;
&lt;p&gt;When a line is destroyed, each line above goes down one line, yet the gravity is a little bit specific, which means that even when a block is above a hole it won’t go down further than one line.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;interface&quot;&gt;Interface&lt;&#x2F;h3&gt;
&lt;p&gt;The interface should contain on the left the matrix and a side panel on the right showing the score and the next tetromino.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Hangman</title>
        <published>2021-11-15T00:00:00+00:00</published>
        <updated>2021-11-15T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/archive/hangman/"/>
        <id>https://duckpuck.net/archive/hangman/</id>
        
        <content type="html" xml:base="https://duckpuck.net/archive/hangman/">&lt;p&gt;A simple hangman game with a custom dictionary, the repository contains a binary for linux as well as the sources that can be compiled using Ghc (Haskell&#x27;s default compiler).&lt;&#x2F;p&gt;
&lt;p&gt;This project was created during my studies, which means that I will not work more on this but I wish to keep it for future references if needed.&lt;&#x2F;p&gt;
&lt;p&gt;The Dictionary file contains all words that can be asked by the game. The content of this file can be edited in an editor but it&#x27;s preferable to use the in-game function to add a word.&lt;&#x2F;p&gt;
&lt;p&gt;The goal of this game is to discover a word chosen by the script. The user needs to input a letter each turn as a guess. If the letter is contained in the secret word the script will show the word with the letter(s) visible for the user otherwise the user will lose one of its 8 lifes.&lt;&#x2F;p&gt;
&lt;p&gt;If the word is fully discovered the user wins the game but if the number of lives is 0 the user loses the game.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Mastermind</title>
        <published>2021-11-14T00:00:00+00:00</published>
        <updated>2021-11-14T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/archive/mastermind/"/>
        <id>https://duckpuck.net/archive/mastermind/</id>
        
        <content type="html" xml:base="https://duckpuck.net/archive/mastermind/">&lt;p&gt;This project was created during my studies, which means that I will not work more on this but I wish to keep it for future references if needed.&lt;&#x2F;p&gt;
&lt;p&gt;The project is a game of mastermind in console. The goal of this game is to discover a combination of several marble chosen by the script among the following colors :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;g : green&lt;&#x2F;li&gt;
&lt;li&gt;r : red&lt;&#x2F;li&gt;
&lt;li&gt;b : blue&lt;&#x2F;li&gt;
&lt;li&gt;y : yellow&lt;&#x2F;li&gt;
&lt;li&gt;w : white&lt;&#x2F;li&gt;
&lt;li&gt;o : orange&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;There are three level of difficulty :&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Level&lt;&#x2F;th&gt;&lt;th&gt;Marble to discover&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Easy&lt;&#x2F;td&gt;&lt;td&gt;4&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Medium&lt;&#x2F;td&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hard&lt;&#x2F;td&gt;&lt;td&gt;6&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;The user has 8 guesses to find the correct combination, each time the script will return one of those three symbols for each marble :&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Symbol&lt;&#x2F;th&gt;&lt;th&gt;Meaning&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;.&lt;&#x2F;td&gt;&lt;td&gt;The marble is present in the combination but in another place&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;0&lt;&#x2F;td&gt;&lt;td&gt;The marble is at this place&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;x&lt;&#x2F;td&gt;&lt;td&gt;The marble isn&#x27;t in the secret combination&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Shoes 3 documentation</title>
        <published>2021-10-01T00:00:00+00:00</published>
        <updated>2021-10-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/archive/shoes-documentation/"/>
        <id>https://duckpuck.net/archive/shoes-documentation/</id>
        
        <content type="html" xml:base="https://duckpuck.net/archive/shoes-documentation/">
&lt;div class=&quot;image&quot;&gt;
  &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;shoes_logo.svg&quot; alt=&quot;Shoes unofficial logo&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;Shoes is a GUI library for Ruby, I used it when creating the now &lt;a href=&quot;https:&#x2F;&#x2F;duckpuck.net&#x2F;projects&#x2F;png-glitch-art-tools&#x2F;legacy-glitched-factory&#x2F;&quot;&gt;legacy glitched factory&lt;&#x2F;a&gt;. The documentation was embeded in the software needed to create the binaries but it wasn&#x27;t practical to browse, first of all because the search field was useless but mostly because the software had to bad habit to randomly crash. This website was my attempt to migrate this documentation to the browser.&lt;&#x2F;p&gt;
&lt;p&gt;Shoes 3 has since been abandonned so this website has no real use.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Mruby</title>
        <published>2020-03-07T00:00:00+00:00</published>
        <updated>2020-03-07T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://duckpuck.net/notes/mruby/"/>
        <id>https://duckpuck.net/notes/mruby/</id>
        
        <content type="html" xml:base="https://duckpuck.net/notes/mruby/">
&lt;div class=&quot;image small-image&quot;&gt;
    &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;duckpuck.net&amp;#x2F;.&amp;#x2F;images&amp;#x2F;mruby.png&quot; alt=&quot;glitched logo of mruby&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;&lt;a href=&quot;http:&#x2F;&#x2F;mruby.org&#x2F;&quot;&gt;mruby&lt;&#x2F;a&gt; is a ruby implementation that allows compiling ruby code, unfortunately there&#x27;s not so much documentation around therefore this is a dump of the info I gather for my personal use.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;compile-mruby-with-require-support&quot;&gt;Compile mruby with require support&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;why&quot;&gt;Why ?&lt;&#x2F;h3&gt;
&lt;p&gt;In order to compile a ruby library that uses the &lt;code&gt;require&lt;&#x2F;code&gt; syntax.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;compiling&quot;&gt;Compiling&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;Clone mruby project &lt;code&gt;git clone https:&#x2F;&#x2F;github.com&#x2F;mruby&#x2F;mruby.git&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Change &lt;code&gt;build_config&#x2F;default.rb&lt;&#x2F;code&gt; to :&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;MRuby&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;Build&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.new do &lt;&#x2F;span&gt;&lt;span&gt;|conf|
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;if ENV&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;OS&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;!= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;Windows_NT&amp;#39; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;then
&lt;&#x2F;span&gt;&lt;span&gt;    conf&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;cc&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;flags &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;lt;&amp;lt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;%w|-fPIC| &lt;&#x2F;span&gt;&lt;span style=&quot;color:#616e88;&quot;&gt;# needed for using bundled gems
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;end
&lt;&#x2F;span&gt;&lt;span&gt;  conf&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;toolchain
&lt;&#x2F;span&gt;&lt;span&gt;  conf&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;gembox &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;default&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;  conf&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;enable_bintest
&lt;&#x2F;span&gt;&lt;span&gt;  conf&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;enable_test
&lt;&#x2F;span&gt;&lt;span&gt;  conf&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.gem &lt;&#x2F;span&gt;&lt;span&gt;:github &lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;=&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;mattn&#x2F;mruby-require&amp;#39;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;end
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Compile using &lt;code&gt;rake&lt;&#x2F;code&gt; in the root folder&lt;&#x2F;li&gt;
&lt;li&gt;The binaries are compiled into &lt;code&gt;build&#x2F;host&#x2F;bin&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;compile-a-simple-ruby-file-with-mruby&quot;&gt;Compile a simple ruby file with mruby&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;what-is-this-document-for&quot;&gt;What is this document for ?&lt;&#x2F;h3&gt;
&lt;p&gt;mruby is an emdedded version of ruby, here&#x27;s how to compile a simple ruby file into C file.
This memo is using &lt;a href=&quot;http:&#x2F;&#x2F;mruby.org&#x2F;docs&#x2F;articles&#x2F;executing-ruby-code-with-mruby.html&quot;&gt;mruby&#x27;s official compiling guide&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;install-mruby&quot;&gt;Install mruby&lt;&#x2F;h3&gt;
&lt;p&gt;Using rbenv :&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;look which version of mruby is available to install :
&lt;code&gt;rbenv install -l&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;at the time I&#x27;m writing this memo the version is &lt;code&gt;mruby-2.1.2&lt;&#x2F;code&gt; :
&lt;code&gt;rbenv install mruby-2.1.2&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;create-project-folder&quot;&gt;Create project folder&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span&gt; my_project
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span&gt; my_project
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;rbenv&lt;&#x2F;span&gt;&lt;span&gt; local mruby-2.1.2
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;create-the-needed-files&quot;&gt;Create the needed files&lt;&#x2F;h3&gt;
&lt;p&gt;You need the following files in the project folder:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Your ruby file to compile, in this case called &lt;code&gt;test.rb&lt;&#x2F;code&gt; :&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;font-style:italic;color:#88c0d0;&quot;&gt;puts &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;this is a test&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;A file that will handle your c code here called &lt;code&gt;test_stub.c&lt;&#x2F;code&gt; :&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre data-lang=&quot;c&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-c &quot;&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span style=&quot;color:#5e81ac;&quot;&gt;#include &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;lt;mruby.h&amp;gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#5e81ac;&quot;&gt;#include &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;lt;mruby&#x2F;irep.h&amp;gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#5e81ac;&quot;&gt;#include &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;test.c&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;int
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;main&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;void&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;span&gt;{
&lt;&#x2F;span&gt;&lt;span&gt;  mrb_state &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;*&lt;&#x2F;span&gt;&lt;span&gt;mrb &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;mrb_open&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;if &lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;!&lt;&#x2F;span&gt;&lt;span&gt;mrb) { &lt;&#x2F;span&gt;&lt;span style=&quot;color:#616e88;&quot;&gt;&#x2F;* handle error *&#x2F; &lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;mrb_load_irep&lt;&#x2F;span&gt;&lt;span&gt;(mrb&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; test_symbol)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;mrb_close&lt;&#x2F;span&gt;&lt;span&gt;(mrb)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;return &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;compile-your-ruby-file-to-c&quot;&gt;Compile your ruby file to C&lt;&#x2F;h3&gt;
&lt;p&gt;Compiling to c file is straight forward :
&lt;code&gt;mrbc -Btest_symbol test.rb&lt;&#x2F;code&gt; should produce a file named &lt;code&gt;test.c&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;compile-your-c-file&quot;&gt;Compile your C file&lt;&#x2F;h3&gt;
&lt;p&gt;using gcc you can compile you &lt;code&gt;test.c&lt;&#x2F;code&gt; like that :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;gcc&lt;&#x2F;span&gt;&lt;span&gt; -std&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;c99 -I &#x2F;Users&#x2F;username&#x2F;.rbenv&#x2F;versions&#x2F;mruby-2.1.2&#x2F;include&#x2F; test_stub.c -o test_program &#x2F;Users&#x2F;username&#x2F;.rbenv&#x2F;versions&#x2F;mruby-2.1.2&#x2F;lib&#x2F;libmruby.a -lm
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;execute-your-newly-compiled-program&quot;&gt;Execute your newly compiled program&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;code&gt;.&#x2F;test_program&lt;&#x2F;code&gt; should print &lt;code&gt;this is a test&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
