<?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: Lex</title>
    <description>The latest articles on DEV Community by Lex (@lecsusoff).</description>
    <link>https://dev.to/lecsusoff</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%2F3323311%2F92930e72-dc91-43d8-8d3e-b95f52e8e9e0.png</url>
      <title>DEV Community: Lex</title>
      <link>https://dev.to/lecsusoff</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lecsusoff"/>
    <language>en</language>
    <item>
      <title>I made my own Programming Language</title>
      <dc:creator>Lex</dc:creator>
      <pubDate>Fri, 04 Jul 2025 17:50:10 +0000</pubDate>
      <link>https://dev.to/lecsusoff/i-made-my-own-programming-language-f28</link>
      <guid>https://dev.to/lecsusoff/i-made-my-own-programming-language-f28</guid>
      <description>&lt;p&gt;I'm a Python developer through and through. I love the ecosystem, the community, the whole deal. But my hands... my hands have muscle memory. They &lt;em&gt;want&lt;/em&gt; to type curly braces &lt;code&gt;{}&lt;/code&gt;. They miss &lt;code&gt;for (let i = 0; ...)&lt;/code&gt; loops.&lt;/p&gt;

&lt;p&gt;So, like any reasonable developer, I decided to fix this minor personal annoyance by doing something completely unreasonable: I built my own programming language.&lt;/p&gt;

&lt;p&gt;Meet &lt;strong&gt;Glorp&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It's my weird little passion project. It's a statically-typed, curly-brace language that doesn't try to take over the world. Instead, it does one thing: it transpiles your code into clean, modern Python. The idea was simple: get a syntax that feels like a comfy mix of C/JavaScript, but keep the entire, massive power of the Python runtime.&lt;/p&gt;

&lt;p&gt;Let me show you what it looks like.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/LecSUSOff" rel="noopener noreferrer"&gt;
        LecSUSOff
      &lt;/a&gt; / &lt;a href="https://github.com/LecSUSOff/glorp" rel="noopener noreferrer"&gt;
        glorp
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Glorp programming languange
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;br&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Glorp Programming Language&lt;/h1&gt;
&lt;/div&gt;
  &lt;p&gt;
    An expressive, reactive, and Python-interoperable language that transpiles to clean Python
    &lt;br&gt;
    &lt;br&gt;
    &lt;a href="https://glorp.readthedocs.io/en/latest/" rel="nofollow noopener noreferrer"&gt;&lt;strong&gt;Explore the Docs »&lt;/strong&gt;&lt;/a&gt;
    &lt;br&gt;
    &lt;br&gt;
    &lt;a href="https://github.com/LecSUSOff/glorp/issues" rel="noopener noreferrer"&gt;Report Bug&lt;/a&gt;
    ·
    &lt;a href="https://github.com/LecSUSOff/glorp/issues" rel="noopener noreferrer"&gt;Request Feature&lt;/a&gt;
  &lt;/p&gt;
&lt;p&gt;
  
  &lt;a href="https://discord.gg/nbNMvvc9" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f75ded266f19e8603e0390c5294d5a54ca8e33f6ad7b27fedecb75cd4a58157a/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f594f55525f5345525645525f49443f6c6f676f3d646973636f7264266c6162656c3d446973636f7264" alt="Discord"&gt;&lt;/a&gt;
  &lt;a href="https://glorp.readthedocs.io/en/latest/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/758a0a0a919573aee7397bd9a53f80d91de192a74f23f714ba662c0eabac0a5f/68747470733a2f2f696d672e736869656c64732e696f2f72656164746865646f63732f676c6f7270" alt="Documentation Status"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/LecSUSOff/glorp/blob/main/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/ffa5246b82ea87fd2e7cdf71ef827a99a8c437e329335f3e348e8410cd6d1d93/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4c65635355534f66662f676c6f7270" alt="License"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/LecSUSOff/glorp/actions/workflows/ci.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/LecSUSOff/glorp/actions/workflows/ci.yml/badge.svg" alt="Build Status"&gt;&lt;/a&gt;
&lt;/p&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;About Glorp&lt;/h2&gt;

&lt;/div&gt;

&lt;p&gt;Glorp is a modern programming language designed for productivity and developer happiness. It combines an expressive, clean syntax with powerful features like first-class reactivity and seamless Python library integration.&lt;/p&gt;

&lt;p&gt;At its core, Glorp is a &lt;strong&gt;transpiled language&lt;/strong&gt;. It takes your &lt;code&gt;.glorp&lt;/code&gt; source code and converts it into highly readable and efficient Python, giving you the performance and reliability of a mature ecosystem with the benefits of a cutting-edge syntax.&lt;/p&gt;

&lt;p&gt;The core philosophies are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Write Expressive Code&lt;/strong&gt;: Focus on your logic with an intuitive syntax that reduces boilerplate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leverage Python's Power&lt;/strong&gt;: Don't reinvent the wheel. Use any Python library (&lt;code&gt;numpy&lt;/code&gt;, &lt;code&gt;requests&lt;/code&gt;, &lt;code&gt;Django&lt;/code&gt;) with a single line of code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Embrace Reactivity&lt;/strong&gt;: Build event-driven and reactive applications effortlessly with the…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/LecSUSOff/glorp" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h2&gt;
  
  
  So What's the Vibe?
&lt;/h2&gt;

&lt;p&gt;I basically just cherry-picked features I personally like and glued them together.&lt;/p&gt;

&lt;p&gt;First, the basics. You declare variables with &lt;code&gt;let&lt;/code&gt;, and you have to give them a type (&lt;code&gt;Int&lt;/code&gt;, &lt;code&gt;Str&lt;/code&gt;, &lt;code&gt;Bool&lt;/code&gt;, etc.). This has saved me from dumb mistakes more times than I can count.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This just feels right to me.
let Int my_age = 30
let Str name = "Alex"
let List numbers = [1, 2, 3]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Functions can be written the classic C-style way with braces, or you can use a short arrow syntax for one-liners. Every function gets automatically wrapped with &lt;code&gt;typeguard&lt;/code&gt; at runtime, because I believe in types but I'm also lazy and like when the computer checks them for me.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// A full function
fn Str greet(Str name) {
  =&amp;gt; "Hello, " + name + "!"
}

// A quick one-liner
fn Int add(Int a, Int b) =&amp;gt; a + b

// Like in many compiled languages, the program starts in Main()
fn Null Main() {
    out(greet("World"))
    out(add(5, 10))
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The control flow is probably the biggest reason I started this. No more &lt;code&gt;elif&lt;/code&gt; or counting spaces. Just good old-fashioned &lt;code&gt;if/else&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, and a &lt;code&gt;for&lt;/code&gt; loop that makes sense to my C-wired brain.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This just feels less cluttered to me.
for let Int i = 0 to 10 {
  out(i)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  The "Aha!" Moment: Reactive &lt;code&gt;watch&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;This is the feature where I really started having fun. I wanted to play with some basic reactive ideas. The &lt;code&gt;watch&lt;/code&gt; keyword lets you attach a block of code to a variable that runs &lt;em&gt;only&lt;/em&gt; when its value changes.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Set up a watcher on 'counter'
watch Int counter = 0 -&amp;gt; {
  out("The counter changed! It's now: " + counter)
}

counter = 1 // prints "The counter changed! It's now: 1"
counter = 2 // prints "The counter changed! It's now: 2"
counter = 2 // ...crickets. The value is the same, so the code doesn't run.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Under the hood, this is a fun little hack using a Python wrapper class with a custom setter. When you assign a new value, the setter intercepts it, compares it to the old value, and calls your handler function if they're different. Simple, but surprisingly useful for quick UI updates or logging.&lt;/p&gt;
&lt;h2&gt;
  
  
  How the Sausage is Made
&lt;/h2&gt;

&lt;p&gt;There's no dark magic here. It's just two brilliant Python libraries doing all the heavy lifting:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Lark&lt;/strong&gt;: This thing is a beast. You write a grammar file that defines the "shape" of your language (e.g., "a function starts with &lt;code&gt;fn&lt;/code&gt;, then a type, then a name..."). Lark takes your &lt;code&gt;.glorp&lt;/code&gt; file and chews it up into a structured tree.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Transformer&lt;/strong&gt;: Then, I walk that tree. For every piece of the grammar, like an &lt;code&gt;if_stmnt&lt;/code&gt;, I have a Python method that takes the bits and pieces (the condition, the body) and just spits out the equivalent Python code as a string: &lt;code&gt;f"if {condition}:\n {body}"&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I stitch all those strings together, and a final nerdy touch: I use Python's &lt;code&gt;linecache&lt;/code&gt; module to fake the filename. This means if your Glorp code crashes, the Python traceback points you to the correct line in your &lt;code&gt;.glorp&lt;/code&gt; source file, not the generated mess.&lt;/p&gt;
&lt;h2&gt;
  
  
  Sharing Code with &lt;code&gt;glorppkg&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Once I had something working, I realized it'd be fun to share code. So I hacked together &lt;code&gt;glorppkg&lt;/code&gt;, a super simple command-line tool to upload and download modules from a central server (which is just a tiny Flask app running on a free tier).&lt;/p&gt;

&lt;p&gt;You can upload your masterpiece:&lt;br&gt;
&lt;code&gt;glorppkg upload my_awesome_lib&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And your friends can download it:&lt;br&gt;
&lt;code&gt;glorppkg get my_awesome_lib&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  So, Wanna Play?
&lt;/h2&gt;

&lt;p&gt;Look, Glorp isn't going to replace Python. It's not the next big thing. It's a personal project born from a love of programming and a specific taste in syntax. It was an incredible learning experience, and it's just plain &lt;em&gt;fun&lt;/em&gt; to use.&lt;/p&gt;

&lt;p&gt;If any of this sounds interesting to you, I'd be thrilled for you to check it out.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The code is all on &lt;strong&gt;&lt;a href="https://github.com/lecsusoff/Glorp" rel="noopener noreferrer"&gt;GitHub at lecsusoff/Glorp&lt;/a&gt;&lt;/strong&gt;. Star it if you feel like it!&lt;/li&gt;
&lt;li&gt;  I wrote up some more detailed info in the &lt;strong&gt;&lt;a href="https://glorp.readthedocs.io/en/latest/" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;  And if you want to ask questions or just show off what you made, come hang out on our &lt;strong&gt;&lt;a href="https://discord.gg/JJXTbQwWxR" rel="noopener noreferrer"&gt;Discord server&lt;/a&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for letting me share my weird little project with you. I can't wait to see if anyone else builds something cool (or silly) with it.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>programminglanguage</category>
      <category>python</category>
    </item>
  </channel>
</rss>
