<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Moca</title>
    <description>The latest articles on DEV Community by Moca (@moca_fd0227eb23c29ea2d065).</description>
    <link>https://dev.to/moca_fd0227eb23c29ea2d065</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%2F3873307%2F2c2392c3-baac-4bcd-af34-09b02bc1e897.jpg</url>
      <title>DEV Community: Moca</title>
      <link>https://dev.to/moca_fd0227eb23c29ea2d065</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moca_fd0227eb23c29ea2d065"/>
    <language>en</language>
    <item>
      <title>Geul: A Native Compiled Language Designed Around Korean Grammar (SOV, Particle Binding, Self-Hosting)</title>
      <dc:creator>Moca</dc:creator>
      <pubDate>Sat, 11 Apr 2026 10:11:22 +0000</pubDate>
      <link>https://dev.to/moca_fd0227eb23c29ea2d065/geul-a-native-compiled-language-designed-around-korean-grammar-sov-particle-binding-3n51</link>
      <guid>https://dev.to/moca_fd0227eb23c29ea2d065/geul-a-native-compiled-language-designed-around-korean-grammar-sov-particle-binding-3n51</guid>
      <description>&lt;p&gt;Every non-English programming language I've seen does the same thing: translate &lt;br&gt;
the keywords. &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, &lt;code&gt;return&lt;/code&gt; become local words, but the grammar stays &lt;br&gt;
identical to C or Python.&lt;/p&gt;

&lt;p&gt;That never felt right to me for Korean.&lt;/p&gt;

&lt;p&gt;Korean isn't just "English with different words." It's a fundamentally different &lt;br&gt;
grammatical structure — SOV word order, agglutinative morphology, and a particle &lt;br&gt;
system that carries meaning independently of word position.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;글 (Geul)&lt;/strong&gt; — a natively compiled, self-hosting programming language &lt;br&gt;
that actually models Korean grammar instead of just wearing it as a skin.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Core Problem: Korean is SOV, Not SVO
&lt;/h2&gt;

&lt;p&gt;English (and most programming languages) follow SVO order:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;S&lt;/strong&gt;ubject &lt;strong&gt;V&lt;/strong&gt;erb &lt;strong&gt;O&lt;/strong&gt;bject → &lt;code&gt;add(5, 3)&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Korean follows SOV:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;S&lt;/strong&gt;ubject &lt;strong&gt;O&lt;/strong&gt;bject &lt;strong&gt;V&lt;/strong&gt;erb → &lt;code&gt;나는 밥을 먹다&lt;/code&gt; (I rice eat)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But more importantly, Korean uses &lt;strong&gt;grammatical particles&lt;/strong&gt; to mark roles:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Particle&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;을/를&lt;/td&gt;
&lt;td&gt;Object marker&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;에&lt;/td&gt;
&lt;td&gt;Location / target&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;로&lt;/td&gt;
&lt;td&gt;Direction / method&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;이/가&lt;/td&gt;
&lt;td&gt;Subject marker&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This means word order is &lt;em&gt;flexible&lt;/em&gt; in Korean — the particles carry the meaning, &lt;br&gt;
not the position.&lt;/p&gt;


&lt;h2&gt;
  
  
  What This Looks Like in Code
&lt;/h2&gt;

&lt;p&gt;In Geul, a function call follows Korean SOV structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5를 3에 더하다
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Breaking it down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;5를&lt;/code&gt; — 5 marked with &lt;strong&gt;를&lt;/strong&gt; (object marker)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;3에&lt;/code&gt; — 3 marked with &lt;strong&gt;에&lt;/strong&gt; (target marker)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;더하다&lt;/code&gt; — "to add" (verb form)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Compare this to the equivalent in C:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function declaration mirrors this structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[정수 왼쪽을 정수 오른쪽에 더하기]는 -&amp;gt; 정수 {
    반환 왼쪽 + 오른쪽.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;왼쪽을&lt;/code&gt; declares that the parameter &lt;code&gt;왼쪽&lt;/code&gt; (left) expects the &lt;strong&gt;를/을&lt;/strong&gt; particle.&lt;br&gt;&lt;br&gt;
&lt;code&gt;오른쪽에&lt;/code&gt; declares that &lt;code&gt;오른쪽&lt;/code&gt; (right) expects the &lt;strong&gt;에&lt;/strong&gt; particle.&lt;/p&gt;

&lt;p&gt;The parser resolves argument-to-parameter binding through particle matching — &lt;br&gt;
not positional order.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Morpheme Problem
&lt;/h2&gt;

&lt;p&gt;Korean verbs conjugate heavily. The call site uses a conjugated verb form, but &lt;br&gt;
the function is declared with a nominalized (noun) form:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Form&lt;/th&gt;
&lt;th&gt;Korean&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Function name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;더하기&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;"adding" (noun form)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Call site&lt;/td&gt;
&lt;td&gt;&lt;code&gt;더하다&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;"to add" (verb form)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The compiler needs to know that &lt;code&gt;더하다&lt;/code&gt; → &lt;code&gt;더하기&lt;/code&gt; at parse time.&lt;/p&gt;

&lt;p&gt;To solve this, I built a &lt;strong&gt;3-level recursive morpheme analyzer&lt;/strong&gt; that strips &lt;br&gt;
Korean verb conjugation suffixes and maps call-site verb forms to their &lt;br&gt;
declared function names automatically.&lt;/p&gt;


&lt;h2&gt;
  
  
  Compiler Architecture
&lt;/h2&gt;

&lt;p&gt;Geul has two backends:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.글 source
    │
    ▼
Morpheme Analysis   ← 3-level recursive affix splitting
    │
    ▼
Recursive Descent Parser   ← SOV + particle-aware
    │
    ▼
AST → 3-Address IR + Static Type Checking
    │
    ├──────────────────────┐
    ▼                      ▼
C Transpiler          x86-64 Native
(cl/gcc)              (PE direct write)
    │                      │
    ▼                      ▼
  .exe                   .exe
                    (zero external deps)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The native backend writes &lt;strong&gt;PE headers and x86-64 machine code directly&lt;/strong&gt; — &lt;br&gt;
no &lt;code&gt;cl.exe&lt;/code&gt;, no &lt;code&gt;gcc&lt;/code&gt;, no external assembler required.&lt;/p&gt;
&lt;h3&gt;
  
  
  Optimizations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Compare-branch fusion&lt;/strong&gt; — &lt;code&gt;cmp + jcc&lt;/code&gt; direct emit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Register pinning&lt;/strong&gt; — loop variables pinned to callee-saved registers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Peephole&lt;/strong&gt; — dead store elimination, redundant copy removal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loop-invariant code motion&lt;/strong&gt; — constant loads hoisted out of loops&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tail call optimization&lt;/strong&gt; — self-recursion converted to &lt;code&gt;jmp&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Self-Hosting
&lt;/h2&gt;

&lt;p&gt;In v0.5, Geul became self-hosting — the compiler is written in Geul and &lt;br&gt;
compiles itself.&lt;/p&gt;

&lt;p&gt;Verification: bootstrap binary → compile source → output binary SHA256 &lt;br&gt;
fixed-point matches. ✓&lt;/p&gt;

&lt;p&gt;This was the hardest milestone. Getting a compiler to compile itself means &lt;br&gt;
every language feature used in the compiler itself must be fully functional &lt;br&gt;
and stable.&lt;/p&gt;


&lt;h2&gt;
  
  
  Performance
&lt;/h2&gt;

&lt;p&gt;Measured on Intel Ultra 5 226V, 5-run median. C compiled with MSVC &lt;code&gt;/O2&lt;/code&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark&lt;/th&gt;
&lt;th&gt;Geul&lt;/th&gt;
&lt;th&gt;C /O2&lt;/th&gt;
&lt;th&gt;vs C&lt;/th&gt;
&lt;th&gt;vs Python&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Recursive fib(40)&lt;/td&gt;
&lt;td&gt;464ms&lt;/td&gt;
&lt;td&gt;321ms&lt;/td&gt;
&lt;td&gt;1.45x&lt;/td&gt;
&lt;td&gt;15.9x faster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sieve of 1M primes&lt;/td&gt;
&lt;td&gt;10ms&lt;/td&gt;
&lt;td&gt;8ms&lt;/td&gt;
&lt;td&gt;1.30x&lt;/td&gt;
&lt;td&gt;16.7x faster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bubble sort 30k&lt;/td&gt;
&lt;td&gt;1564ms&lt;/td&gt;
&lt;td&gt;564ms&lt;/td&gt;
&lt;td&gt;2.77x&lt;/td&gt;
&lt;td&gt;24.5x faster&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The bubble sort gap (2.77x) is the most notable — nested loop register &lt;br&gt;
allocation pressure is the likely cause. It's on the roadmap.&lt;/p&gt;


&lt;h2&gt;
  
  
  Quick Syntax Tour
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Variables and types:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;정수 나이 = 25.          (* int *)
실수 원주율 = 3.14159.   (* double *)
문자열 이름 = "홍길동".  (* string *)
참거짓 활성 = 참.        (* bool *)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;String interpolation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"{이름}은 {나이}세입니다\n"을 쓰다.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Variables are embedded directly with automatic type formatting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Control flow:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;값 &amp;gt; 10이면 {
    "크다\n"을 쓰다.
}
아니면 {
    "작다\n"을 쓰다.
}

(번호 &amp;lt; 10)동안 {
    번호를 증가하다.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Structs:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;묶음 점은 정수 가로, 정수 세로.

점 위치.
위치의 가로 = 10.
위치의 세로 = 20.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Current State
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ Windows 10/11 (Linux ELF planned)&lt;/li&gt;
&lt;li&gt;✅ VS Code extension (syntax highlight, F5 run, LSP autocomplete)&lt;/li&gt;
&lt;li&gt;✅ 9 stdlib modules, 62 functions&lt;/li&gt;
&lt;li&gt;✅ Static type checking at compile time&lt;/li&gt;
&lt;li&gt;✅ Self-hosting since v0.5&lt;/li&gt;
&lt;li&gt;🔲 Package manager (planned)&lt;/li&gt;
&lt;li&gt;🔲 Debug info / PDB (planned)&lt;/li&gt;
&lt;li&gt;🔲 Error handling syntax (&lt;code&gt;시도/실패&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Currently at &lt;strong&gt;v0.7.1&lt;/strong&gt; (18 releases since March 2026, MIT license).&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;No install needed — browser playground:&lt;br&gt;&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://geul-web.vercel.app/playground" rel="noopener noreferrer"&gt;https://geul-web.vercel.app/playground&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Source:&lt;br&gt;&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://github.com/wwoosshh/geul-lang" rel="noopener noreferrer"&gt;https://github.com/wwoosshh/geul-lang&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;Curious what approaches others have seen for non-English or non-SVO language &lt;br&gt;
design — are there other languages that go beyond keyword translation?&lt;/p&gt;

</description>
      <category>programming</category>
      <category>opensource</category>
      <category>languages</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
