<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Taichi Ishitani</title>
    <description>The latest articles on Forem by Taichi Ishitani (@taichiishitani).</description>
    <link>https://forem.com/taichiishitani</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F286946%2Fc9e8f722-d7b8-49dc-bca4-b4e2818696c8.jpeg</url>
      <title>Forem: Taichi Ishitani</title>
      <link>https://forem.com/taichiishitani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/taichiishitani"/>
    <language>en</language>
    <item>
      <title>YPS: YAML Positioning System</title>
      <dc:creator>Taichi Ishitani</dc:creator>
      <pubDate>Wed, 08 Oct 2025 12:55:18 +0000</pubDate>
      <link>https://forem.com/taichiishitani/yps-yaml-positioning-system-2853</link>
      <guid>https://forem.com/taichiishitani/yps-yaml-positioning-system-2853</guid>
      <description>&lt;p&gt;It is hard to debug big YAML files because parsed objects do not have their position info; we have to search where are wrong values in the original YAML by eye.&lt;/p&gt;

&lt;p&gt;I'm developing a Gem named YPS: YAML Positioning System.&lt;br&gt;
&lt;a href="https://github.com/taichi-ishitani/yps" rel="noopener noreferrer"&gt;https://github.com/taichi-ishitani/yps&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;YPS is a Gem to parse YAML and add position info to parsed objects. Parsed objects have the accessor named &lt;code&gt;#position&lt;/code&gt; that returns their position info.&lt;br&gt;
You can use this method to get position info in the original YAML of the receiver object.&lt;br&gt;
Here is an example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'yps'&lt;/span&gt;

&lt;span class="n"&gt;yaml&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;YPS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;~&lt;/span&gt;&lt;span class="no"&gt;'YAML'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="sh"&gt;
children:
  - name: kanta
    age: 8
  - name: kaede
    age: 3
&lt;/span&gt;&lt;span class="no"&gt;YAML&lt;/span&gt;

&lt;span class="c1"&gt;# output&lt;/span&gt;
&lt;span class="c1"&gt;# name: kanta (filename: unknown line 2 column 11)&lt;/span&gt;
&lt;span class="c1"&gt;# age: 8 (filename: unknown line 3 column 10)&lt;/span&gt;
&lt;span class="c1"&gt;# name: kaede (filename: unknown line 4 column 11)&lt;/span&gt;
&lt;span class="c1"&gt;# age: 3 (filename: unknown line 5 column 10)&lt;/span&gt;
&lt;span class="n"&gt;yaml&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'children'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;each&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;child&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
  &lt;span class="n"&gt;child&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;each&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
    &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; (&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;position&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;)"&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more details, please visit its &lt;a href="https://github.com/taichi-ishitani/yps" rel="noopener noreferrer"&gt;repository&lt;/a&gt; and &lt;a href="https://taichi-ishitani.github.io/yps/" rel="noopener noreferrer"&gt;API doc&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
    </item>
  </channel>
</rss>
