<?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: distantfar</title>
    <description>The latest articles on DEV Community by distantfar (@distantfar).</description>
    <link>https://dev.to/distantfar</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4025432%2F603cea8e-6eb0-42fc-ae62-b039e1f7af7b.png</url>
      <title>DEV Community: distantfar</title>
      <link>https://dev.to/distantfar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/distantfar"/>
    <language>en</language>
    <item>
      <title>Coluber: A Compiled Language Designed for Clarity and Simplicity</title>
      <dc:creator>distantfar</dc:creator>
      <pubDate>Sat, 11 Jul 2026 18:02:03 +0000</pubDate>
      <link>https://dev.to/distantfar/coluber-a-compiled-language-designed-for-clarity-and-simplicity-32l7</link>
      <guid>https://dev.to/distantfar/coluber-a-compiled-language-designed-for-clarity-and-simplicity-32l7</guid>
      <description>&lt;p&gt;Over the years, I have grown increasingly found of the idea that code should read like prose. Clear, intentional, and free from unnecessary noise.&lt;/p&gt;

&lt;p&gt;This curiosity led me to build Coluber a compiled, statically-typed programming language designed around three core values: &lt;strong&gt;Fun&lt;/strong&gt;, &lt;strong&gt;Simple&lt;/strong&gt;, and &lt;strong&gt;Fast&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Coluber?
&lt;/h2&gt;

&lt;p&gt;Coluber is a personal hobby project and an open-source language written in Nim. It works by transpiling &lt;code&gt;.clbr&lt;/code&gt; source files into Nim (or optionally Vlang), which are then compiled by their respective toolchains into native binaries.&lt;/p&gt;

&lt;p&gt;The language takes inspiration from Python's indentation-based readability while targeting the performance characteristics of compiled languages. Think of it as a thin, clean layer above a highly optimized native compiler.&lt;/p&gt;

&lt;p&gt;The name comes from Coluber, a genus of non-venomous snakes, known for being fast, agile, and adaptable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Syntax Overview.
&lt;/h2&gt;

&lt;p&gt;Coluber deliberately avoids symbols that tend to add visual clutter. No semicolons, no curly braces, and no cryptic logical operators.&lt;/p&gt;

&lt;p&gt;Here is what a typical Coluber function looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public task calculate_score(points: int, bonus: int) -&amp;gt; int:
    serve total = points + bonus

    cond first (total &amp;gt; 100):
        say("Excellent score.")
    cond other (total &amp;gt;= 50):
        say("Good result.")
    cond nothing:
        say("Keep going.")

    serve total
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few things worth noting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;serve&lt;/code&gt;&lt;/strong&gt; is used to declare variables. The type is inferred automatically, though explicit annotations are supported.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;cond first&lt;/code&gt; / &lt;code&gt;cond other&lt;/code&gt; / &lt;code&gt;cond nothing&lt;/code&gt;&lt;/strong&gt; replace the if / elif / else structure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;loop&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;crawl&lt;/code&gt;&lt;/strong&gt; replace &lt;code&gt;while&lt;/code&gt; and &lt;code&gt;for&lt;/code&gt; respectively.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;task&lt;/code&gt;&lt;/strong&gt; defines functions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The syntax is intentionally orthogonal there is one clear way to do each thing, which keeps code consistent and easy to follow.&lt;/p&gt;

&lt;h2&gt;
  
  
  The FFI Bridge.
&lt;/h2&gt;

&lt;p&gt;One of the more interesting aspects of Coluber is its unified Foreign Function Interface. Rather than building a standard library from scratch, Coluber allows developers to call into existing code written in C, Nim, Python, or JavaScript using a single keyword: &lt;code&gt;introduce&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;introduce python/mathpy task compute_square(x: int) -&amp;gt; int alias square

public task main():
    serve result = square(9)
    say("Result: {result}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When compiling a project with FFI dependencies, Coluber automatically bundles the relevant &lt;code&gt;.py&lt;/code&gt; or &lt;code&gt;.js&lt;/code&gt; files relative to the output binary. This makes the compiled program fully portable, the dependencies travel with the executable, regardless of where it is moved.&lt;/p&gt;

&lt;h2&gt;
  
  
  String Features.
&lt;/h2&gt;

&lt;p&gt;Coluber supports standard string interpolation using &lt;code&gt;{expression}&lt;/code&gt; syntax, as well as the full set of escape characters you would expect from a C-family language:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;serve name = "World"
say("Hello, {name}!\nThis is a new line.\tAnd this is a tab.")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Supported escape sequences include: &lt;code&gt;\n&lt;/code&gt;, &lt;code&gt;\t&lt;/code&gt;, &lt;code&gt;\r&lt;/code&gt;, &lt;code&gt;\a&lt;/code&gt;, &lt;code&gt;\b&lt;/code&gt;, &lt;code&gt;\f&lt;/code&gt;, &lt;code&gt;\v&lt;/code&gt;, &lt;code&gt;\0&lt;/code&gt;, &lt;code&gt;\'&lt;/code&gt;, &lt;code&gt;\"&lt;/code&gt;, and &lt;code&gt;\\&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Status
&lt;/h2&gt;

&lt;p&gt;Coluber is, frankly, a work in progress and that is part of what makes it interesting to work on. &lt;/p&gt;

&lt;p&gt;Repository:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Codeberg: &lt;a href="https://codeberg.org/distantfar/coluber.git" rel="noopener noreferrer"&gt;https://codeberg.org/distantfar/coluber.git&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gitlab: &lt;a href="https://gitlab.com/refrigerant_v1/coluber.git" rel="noopener noreferrer"&gt;https://gitlab.com/refrigerant_v1/coluber.git&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

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