<?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: iambox leekyuha</title>
    <description>The latest articles on Forem by iambox leekyuha (@tarofortune).</description>
    <link>https://forem.com/tarofortune</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%2F3934770%2Ffe75f971-54ed-45de-87f7-58fbb92f8906.png</url>
      <title>Forem: iambox leekyuha</title>
      <link>https://forem.com/tarofortune</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/tarofortune"/>
    <language>en</language>
    <item>
      <title>I Built a Free Korean Astrology Site — Tech Stack and Lessons</title>
      <dc:creator>iambox leekyuha</dc:creator>
      <pubDate>Sat, 16 May 2026 16:19:23 +0000</pubDate>
      <link>https://forem.com/tarofortune/i-built-a-free-korean-astrology-site-tech-stack-and-lessons-1f4m</link>
      <guid>https://forem.com/tarofortune/i-built-a-free-korean-astrology-site-tech-stack-and-lessons-1f4m</guid>
      <description>&lt;p&gt;Side project: built a free Korean Saju (4-pillar astrology) calculator. Sharing the tech stack and a few non-obvious gotchas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: Python 3.13, Flask&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosting&lt;/strong&gt;: PythonAnywhere free tier&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Astronomy&lt;/strong&gt;: Custom Meeus algorithm (no external library, 100s/day CPU limit)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No database&lt;/strong&gt;: Charts are pure functions of input&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Live site
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://tarofortune.pythonanywhere.com/en" rel="noopener noreferrer"&gt;https://tarofortune.pythonanywhere.com/en&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Non-obvious lessons
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Free tier CPU is precious
&lt;/h3&gt;

&lt;p&gt;PythonAnywhere free tier gives 100 CPU seconds per day. Each Saju calculation iterates a Newton-style solver for solar term timing. Without caching, ~30 chart computations would burn through the limit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;functools&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;lru_cache&lt;/span&gt;

&lt;span class="nd"&gt;@lru_cache&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;maxsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4096&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;solar_term_jd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;year&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;term_idx&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# ...
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Solar terms repeat for the same &lt;code&gt;(year, term)&lt;/code&gt; pair, so caching is essentially free.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Korean text on Windows console is hell
&lt;/h3&gt;

&lt;p&gt;Default code page on Windows is cp949. Add &lt;code&gt;python -X utf8 script.py&lt;/code&gt; or &lt;code&gt;os.environ["PYTHONIOENCODING"] = "utf-8"&lt;/code&gt; to avoid &lt;code&gt;UnicodeEncodeError&lt;/code&gt; on every print of Korean characters.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. PythonAnywhere whitelist for outbound HTTPS
&lt;/h3&gt;

&lt;p&gt;Free tier blocks outgoing HTTPS except to whitelisted domains. Plan for this if your app needs to call external APIs.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. i18n the right way
&lt;/h3&gt;

&lt;p&gt;I added &lt;code&gt;/en/&lt;/code&gt; prefix routing rather than per-template translation logic. Cleaner separation, easier SEO with hreflang.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Multi-language expansion (Japanese, Chinese)&lt;/li&gt;
&lt;li&gt;Service Worker for offline support (done)&lt;/li&gt;
&lt;li&gt;IndexNow integration for instant Bing/Naver indexing (done)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Open to feedback on the math or UX. Try the &lt;a href="https://tarofortune.pythonanywhere.com/en" rel="noopener noreferrer"&gt;chart reader&lt;/a&gt; and let me know what's off.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>showdev</category>
      <category>python</category>
      <category>flask</category>
    </item>
    <item>
      <title>Day Master Theory: Why 60 Personality Archetypes Beat 12 Sun Signs</title>
      <dc:creator>iambox leekyuha</dc:creator>
      <pubDate>Sat, 16 May 2026 12:17:04 +0000</pubDate>
      <link>https://forem.com/tarofortune/day-master-theory-why-60-personality-archetypes-beat-12-sun-signs-29g0</link>
      <guid>https://forem.com/tarofortune/day-master-theory-why-60-personality-archetypes-beat-12-sun-signs-29g0</guid>
      <description>&lt;p&gt;Coming from Western astrology and curious about Asian systems? The biggest practical shift is resolution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sun signs: 12 archetypes
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Day Pillars: 60 archetypes
&lt;/h2&gt;

&lt;p&gt;In Korean Saju (and Chinese BaZi), your "core type" isn't your sun sign — it's your &lt;strong&gt;Day Pillar&lt;/strong&gt;, the Heavenly Stem + Earthly Branch pair of your birth day. With 10 stems × 12 branches × parity-pairing, you get 60 distinct types.&lt;/p&gt;

&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;A Western Leo could be one of these very different Day Pillars:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bingwu (丙午)&lt;/strong&gt; — fire + fire branch = maximum charisma&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Renxu (壬戌)&lt;/strong&gt; — water + earth branch = contemplative depth&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jiawu (甲午)&lt;/strong&gt; — wood + fire branch = ambitious expressive&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same Sun, three different people.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to find yours
&lt;/h2&gt;

&lt;p&gt;Free calculator: &lt;a href="https://tarofortune.pythonanywhere.com/en" rel="noopener noreferrer"&gt;https://tarofortune.pythonanywhere.com/en&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enter birth date and time. The site computes your Day Master (stem) and Day Pillar (stem-branch), then shows the archetype reading for that specific combination.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters for self-understanding
&lt;/h2&gt;

&lt;p&gt;I'm not arguing Saju "predicts" anything. But as a vocabulary for self-reflection, 60 archetypes give you much more nuanced language than 12.&lt;/p&gt;

&lt;p&gt;Same logic that makes MBTI's 16 types more useful than introvert/extravert binary.&lt;/p&gt;

&lt;p&gt;What's your Day Pillar? Drop yours below.&lt;/p&gt;

</description>
      <category>personality</category>
      <category>philosophy</category>
      <category>discuss</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Building a Saju (Korean Astrology) Calculator from Scratch in Python</title>
      <dc:creator>iambox leekyuha</dc:creator>
      <pubDate>Sat, 16 May 2026 11:32:36 +0000</pubDate>
      <link>https://forem.com/tarofortune/building-a-saju-korean-astrology-calculator-from-scratch-in-python-3cpc</link>
      <guid>https://forem.com/tarofortune/building-a-saju-korean-astrology-calculator-from-scratch-in-python-3cpc</guid>
      <description>&lt;p&gt;I built a free Korean astrology (Saju) calculator and wanted to share what makes the math interesting.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Saju?
&lt;/h2&gt;

&lt;p&gt;Saju is the Korean tradition of Chinese 4-pillar astrology (BaZi). Your birth year, month, day, and hour each get encoded as a Heavenly Stem + Earthly Branch pair, giving you 8 characters that describe your "energetic signature."&lt;/p&gt;

&lt;h2&gt;
  
  
  The interesting parts
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Solar terms via Meeus algorithm
&lt;/h3&gt;

&lt;p&gt;The year boundary isn't January 1 — it's the solar term &lt;strong&gt;Ipchun (立春, ~Feb 4)&lt;/strong&gt;, the moment the sun reaches 315° ecliptic longitude. To compute this precisely, I implemented the Meeus astronomical algorithm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;apparent_solar_longitude&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;jd&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;jd&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;2451545.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;36525.0&lt;/span&gt;
    &lt;span class="n"&gt;l0&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;280.46646&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;36000.76983&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.0003032&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;360&lt;/span&gt;
    &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;radians&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="mf"&gt;357.52911&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;35999.05029&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;0.0001537&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;360&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="mf"&gt;1.914602&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;0.004817&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;0.000014&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
         &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.019993&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;0.000101&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
         &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.000289&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="nf"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;l0&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;360&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then Newton-style iteration to find the exact JD when longitude crosses 315°.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Late-Zi hour rule
&lt;/h3&gt;

&lt;p&gt;The day pillar transitions at 23:00 local time, not midnight. If you're born between 23:00 and 24:00, your day pillar rolls forward to the next day. Common bug in online calculators.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Sixty-pillar cycle (六十甲子)
&lt;/h3&gt;

&lt;p&gt;Ten Heavenly Stems × Twelve Earthly Branches, but they pair only on matching parity (Yang-Yang or Yin-Yin), so you get LCM(10, 12) / 2 = 30 paired combos × 2 polarities = 60 pillars.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_pillar_index&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stem&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;stem&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://tarofortune.pythonanywhere.com/en" rel="noopener noreferrer"&gt;Free Saju reader →&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No signup, no email. Pure Python on Flask, hosted on PythonAnywhere free tier.&lt;/p&gt;

&lt;p&gt;Open to feedback on the math or interpretation logic.&lt;/p&gt;

</description>
      <category>python</category>
      <category>webdev</category>
      <category>showdev</category>
      <category>astronomy</category>
    </item>
  </channel>
</rss>
