<?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: DZ-RED</title>
    <description>The latest articles on DEV Community by DZ-RED (@dz-red).</description>
    <link>https://dev.to/dz-red</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%2F4271370%2Ff996469d-ae6a-4550-b1a7-0d8f2beda7bc.png</url>
      <title>DEV Community: DZ-RED</title>
      <link>https://dev.to/dz-red</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dz-red"/>
    <language>en</language>
    <item>
      <title>From a Minecraft Server to My Own Programming Language: Building Wind</title>
      <dc:creator>DZ-RED</dc:creator>
      <pubDate>Sun, 29 Nov 2026 08:26:50 +0000</pubDate>
      <link>https://dev.to/dz-red/from-a-minecraft-server-to-my-own-programming-language-building-wind-of0</link>
      <guid>https://dev.to/dz-red/from-a-minecraft-server-to-my-own-programming-language-building-wind-of0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frl06fueh40znorybswy2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frl06fueh40znorybswy2.png" alt="Wind" width="780" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some time ago, I was running my own Minecraft server. Eventually, I decided to shut it down and start working on something completely different.&lt;/p&gt;

&lt;p&gt;Around that time, I came across a few YouTube videos explaining how compilers and programming languages work.&lt;/p&gt;

&lt;p&gt;After watching them, understanding probably half of what was being explained, and downloading a book about C, I decided to build my own programming language.&lt;/p&gt;

&lt;p&gt;Was I qualified to do that? Probably not.&lt;/p&gt;

&lt;p&gt;Without Claude, I wouldn't have written a single line of the original compiler. My knowledge of C was nowhere near sufficient for a project like this. However, as development progressed, I became increasingly interested in understanding how the compiler actually worked.&lt;/p&gt;

&lt;p&gt;That's how Wind was born.&lt;/p&gt;

&lt;h2&gt;
  
  
  Development, burnout, and coming back
&lt;/h2&gt;

&lt;p&gt;The first development phase lasted approximately two months. Wind was a primitive language capable of performing arithmetic operations, working with arrays, and executing relatively simple programs.&lt;/p&gt;

&lt;p&gt;In September, I downloaded my own source code again, made a few changes, pushed some commits, and eventually abandoned the project once more.&lt;/p&gt;

&lt;p&gt;Meanwhile, I was developing a geopolitical sandbox game and coming up with various startup ideas. The classic "ChatGPT, make me rich" phase.&lt;/p&gt;

&lt;p&gt;Eventually, I realized that game development wasn't really my thing.&lt;/p&gt;

&lt;p&gt;Writing code is one thing. Creating sprites, designing textures, writing scenarios, finding sound effects, and managing every other aspect of a game is something entirely different.&lt;/p&gt;

&lt;p&gt;I enjoyed programming itself much more.&lt;/p&gt;

&lt;p&gt;In November, I returned to Wind with a clearer understanding of what I wanted the language to become.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why another programming language?
&lt;/h2&gt;

&lt;p&gt;Wind is named after, well, the wind.&lt;/p&gt;

&lt;p&gt;I wanted to create a language that would be lightweight, reasonably fast, and easy to learn.&lt;/p&gt;

&lt;p&gt;One of my main frustrations with programming education is the amount of information beginners are expected to absorb before they can build something useful.&lt;/p&gt;

&lt;p&gt;Python is an excellent example of an accessible programming language. Its educational value was one of my main inspirations.&lt;/p&gt;

&lt;p&gt;However, I also wanted Wind to offer static typing and native compilation.&lt;/p&gt;

&lt;p&gt;Wind is primarily intended to be an educational programming language. My long-term goal is to make it suitable for computer science classes, tutoring, and independent learning.&lt;/p&gt;

&lt;p&gt;At the same time, I don't want students to outgrow the language immediately after learning the basics.&lt;/p&gt;

&lt;p&gt;Wind can already be used to build small utilities, automation scripts, simple backend applications, and programs that interact with native C libraries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Syntax and questionable design decisions
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx3wpqmg5d9k67p5hihwr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx3wpqmg5d9k67p5hihwr.png" alt="Simple Wind program" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's the traditional Hello World program:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terminal.paste -&amp;gt; "Hello, world!"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Variable declarations look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int.count = 42
str.name = "Wind"
bool.ready = true
frac.pi = 3,14
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why the dot between the type and the variable name?&lt;/p&gt;

&lt;p&gt;I wanted to visually connect the two. To me, &lt;code&gt;int.count&lt;/code&gt; clearly communicates that &lt;code&gt;count&lt;/code&gt; is associated with the integer type.&lt;/p&gt;

&lt;p&gt;Type inference is also available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var number = 42
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Functions use the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func square(int.x) -&amp;gt; int
    return x * x
end

terminal.paste -&amp;gt; "${square(5)}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of curly braces, Wind uses the &lt;code&gt;end&lt;/code&gt; keyword to close blocks. The arrow in a function declaration indicates its return type.&lt;/p&gt;

&lt;p&gt;Typed collections are supported as well:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int.list.numbers = [10, 20, 30]

dict[str,str].config = [
    "host": "localhost",
    "port": "8080"
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then there's probably my most controversial syntax decision:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;frac.pi = 3,14
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yes, Wind uses a decimal comma.&lt;/p&gt;

&lt;p&gt;I'm developing a language with an emphasis on logical syntax while simultaneously introducing additional parsing rules because of decimal separators.&lt;/p&gt;

&lt;p&gt;The irony isn't lost on me.&lt;/p&gt;

&lt;p&gt;I don't consider the current syntax final. If students, teachers, or other developers find certain features inconvenient, I'm willing to reconsider them.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the compiler works
&lt;/h2&gt;

&lt;p&gt;Wind is implemented in C and uses C as its compilation target.&lt;/p&gt;

&lt;p&gt;Instead of developing a custom machine code backend, I decided to generate C source code and delegate native compilation and optimization to GCC.&lt;/p&gt;

&lt;p&gt;The compilation pipeline looks approximately like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Wind source (.wnd)
        |
        v
      Lexer
        |
        v
      Parser
        |
        v
       AST
        |
        v
    C Codegen
        |
        v
       GCC
        |
        v
Native executable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The lexer converts source code into tokens. The parser constructs an abstract syntax tree, which is subsequently processed by the C code generator.&lt;/p&gt;

&lt;p&gt;GCC handles the remaining compilation stages.&lt;/p&gt;

&lt;p&gt;This approach allows me to focus on language semantics, diagnostics, memory management, and standard functionality without reinventing an existing compiler backend.&lt;/p&gt;

&lt;p&gt;Of course, generating C introduces its own problems. The compiler needs to account for C semantics and avoid introducing undefined behavior into generated programs.&lt;/p&gt;

&lt;p&gt;My relatively limited experience with C has been one of the biggest challenges throughout the development process.&lt;/p&gt;

&lt;p&gt;Building Wind has effectively become my own programming course.&lt;/p&gt;

&lt;h2&gt;
  
  
  WGC: Wind's garbage collector
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fppeutbb7kdgsjz2dzimu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fppeutbb7kdgsjz2dzimu.png" alt="WGC" width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Initially, Wind relied on the Boehm garbage collector for automatic memory management.&lt;/p&gt;

&lt;p&gt;Eventually, I wanted more control over the runtime and fewer external dependencies. That led to the development of WGC, the Wind Garbage Collector.&lt;/p&gt;

&lt;p&gt;WGC implements a mark-and-sweep algorithm.&lt;/p&gt;

&lt;p&gt;Its current implementation includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explicit root tracking.&lt;/li&gt;
&lt;li&gt;A hash-based index for locating managed objects.&lt;/li&gt;
&lt;li&gt;Non-recursive object graph traversal.&lt;/li&gt;
&lt;li&gt;Dedicated allocation pools for certain small objects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Boehm remains available as an alternative garbage collector.&lt;/p&gt;

&lt;p&gt;I've been running comparative benchmarks involving temporary strings and string collections. WGC is approaching Boehm's performance in some of these workloads, although Boehm remains faster in several scenarios.&lt;/p&gt;

&lt;p&gt;I'm not claiming that a relatively young garbage collector is better than an established implementation that has been developed for decades.&lt;/p&gt;

&lt;p&gt;Correctness, predictable behavior, and broader testing are still more important than winning individual benchmarks.&lt;/p&gt;

&lt;p&gt;For me, WGC is both a runtime component and an opportunity to understand automatic memory management in greater depth.&lt;/p&gt;

&lt;h2&gt;
  
  
  A compiler that helps you learn
&lt;/h2&gt;

&lt;p&gt;If Wind is supposed to be an educational language, compiler diagnostics should be one of its most important features.&lt;/p&gt;

&lt;p&gt;An experienced developer can usually understand a short error message. Someone writing their first program might not even understand the terminology used in that message.&lt;/p&gt;

&lt;p&gt;That's why Wind provides three diagnostic modes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wind --diag=compact example.wnd
wind --diag=normal example.wnd
wind --diag=learn example.wnd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;compact&lt;/code&gt; mode provides concise diagnostic messages.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;normal&lt;/code&gt; mode provides more detailed information and is the default.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;learn&lt;/code&gt; mode is intended for beginners. It explains where an error occurred, why it occurred, and, where possible, how to fix it.&lt;/p&gt;

&lt;p&gt;The compiler also provides additional explanations for individual diagnostic codes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wind --explain W2003
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My goal is to help beginners understand their mistakes instead of forcing them to immediately search for an explanation elsewhere.&lt;/p&gt;

&lt;p&gt;I believe compiler diagnostics can play a much bigger role in programming education.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond educational exercises
&lt;/h2&gt;

&lt;p&gt;Despite its educational focus, Wind already provides functionality for working with files, JSON, HTTP, and other practical tasks.&lt;/p&gt;

&lt;p&gt;One of the most recent additions is C FFI support.&lt;/p&gt;

&lt;p&gt;For example, a binding for zlib can describe an external function using a &lt;code&gt;.windbind&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;header &amp;lt;zlib.h&amp;gt;
link "z"
func version() -&amp;gt; str = zlibVersion copy_cstr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The corresponding Wind program can then use the binding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;c.import &amp;lt;zlib&amp;gt;

terminal.paste -&amp;gt; "zlib ${zlib.version()}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows Wind to gradually gain access to the existing ecosystem of C libraries without requiring every integration to be implemented directly inside the compiler.&lt;/p&gt;

&lt;p&gt;FFI also introduces additional responsibilities involving type compatibility, memory ownership, object lifetimes, and calling conventions.&lt;/p&gt;

&lt;p&gt;Automatic memory management doesn't magically make native interoperability safe.&lt;/p&gt;

&lt;p&gt;These are areas where Wind still needs further development and testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Freestanding: an experimental direction
&lt;/h2&gt;

&lt;p&gt;During a recent discussion about Wind, someone suggested using it for operating system development.&lt;/p&gt;

&lt;p&gt;The current Wind runtime and garbage collector are obviously not suitable for every low-level environment.&lt;/p&gt;

&lt;p&gt;This led to the idea of introducing a separate freestanding compilation mode.&lt;/p&gt;

&lt;p&gt;A proposed example might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;target freestanding

export func add(i32.a, i32.b) -&amp;gt; i32
    return a + b
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of generating an executable with the standard Wind runtime, the compiler would produce an object file that could be linked with C or assembly code.&lt;/p&gt;

&lt;p&gt;The proposed mode would introduce features such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fixed-width integer types.&lt;/li&gt;
&lt;li&gt;Raw pointers.&lt;/li&gt;
&lt;li&gt;Static memory management.&lt;/li&gt;
&lt;li&gt;Explicit external function declarations.&lt;/li&gt;
&lt;li&gt;C ABI compatibility.&lt;/li&gt;
&lt;li&gt;Runtime-independent object generation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important part is keeping the regular educational mode simple.&lt;/p&gt;

&lt;p&gt;Beginners shouldn't be required to understand pointers, memory layouts, or calling conventions before writing their first program.&lt;/p&gt;

&lt;p&gt;Freestanding is currently a design proposal, not an implemented feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  What would success look like?
&lt;/h2&gt;

&lt;p&gt;I'm not trying to replace Python, C++, Rust, or any other established programming language.&lt;/p&gt;

&lt;p&gt;My biggest achievement would be seeing Wind used in an actual computer science classroom.&lt;/p&gt;

&lt;p&gt;I'd love to see teachers explain programming concepts using Wind, students write their first programs, and beginners provide feedback about the language's design.&lt;/p&gt;

&lt;p&gt;Perhaps that feedback would force me to reconsider some of my favorite syntax decisions.&lt;/p&gt;

&lt;p&gt;That would be perfectly fine.&lt;/p&gt;

&lt;p&gt;Wind is still a young experimental language. It has limitations, questionable design decisions, and plenty of unfinished work.&lt;/p&gt;

&lt;p&gt;Nevertheless, developing it has taught me considerably more about programming than I knew when I first downloaded that book about C.&lt;/p&gt;

&lt;p&gt;And that's why I'm still working on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Source code and feedback
&lt;/h2&gt;

&lt;p&gt;Wind is open source:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/dz-red/Wind-Lang" rel="noopener noreferrer"&gt;https://github.com/dz-red/Wind-Lang&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd particularly appreciate feedback on the compiler architecture, syntax, garbage collector, and the educational direction of the language.&lt;/p&gt;

&lt;p&gt;What would you expect from a compiled programming language designed primarily for beginners?&lt;/p&gt;

&lt;p&gt;And what would you change about Wind?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: This article is based on my own development experience and was drafted and translated into English with AI assistance.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>softwaredevelopment</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
