<?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: greenServeFE</title>
    <description>The latest articles on DEV Community by greenServeFE (@greenservefe).</description>
    <link>https://dev.to/greenservefe</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%2F4263693%2F11febc2f-dc18-49c2-ae17-3ca6c9b86347.png</url>
      <title>DEV Community: greenServeFE</title>
      <link>https://dev.to/greenservefe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/greenservefe"/>
    <language>en</language>
    <item>
      <title>Loop implementation of greenServeFE programming language</title>
      <dc:creator>greenServeFE</dc:creator>
      <pubDate>Wed, 25 Nov 2026 04:12:14 +0000</pubDate>
      <link>https://dev.to/greenservefe/loop-implementation-of-greenservefe-programming-language-b41</link>
      <guid>https://dev.to/greenservefe/loop-implementation-of-greenservefe-programming-language-b41</guid>
      <description>&lt;h1&gt;
  
  
  Understanding While Loops in greenServeFE
&lt;/h1&gt;

&lt;p&gt;I've been developing &lt;strong&gt;greenServeFE&lt;/strong&gt;, a VM-based execution engine for the greenServe programming language, written in C.&lt;/p&gt;

&lt;p&gt;One of its core features is loop execution through compiled bytecode.&lt;/p&gt;

&lt;h3&gt;
  
  
  A simple while loop
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Start counting from 1.
define count = 1;

# Repeat while the condition is true.
while (count &amp;lt;= 5) {
    print("Iteration: " + count);

    # Update the counter.
    count = count + 1;
}

print("Loop completed!");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&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;Iteration: 1
Iteration: 2
Iteration: 3
Iteration: 4
Iteration: 5
Loop completed!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  How does it execute?
&lt;/h3&gt;

&lt;p&gt;Unlike a simple recursive AST interpreter, greenServeFE compiles source code into bytecode before execution.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;while&lt;/code&gt; loop follows this execution sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Evaluate the loop condition.&lt;/li&gt;
&lt;li&gt;Jump out if the condition is false.&lt;/li&gt;
&lt;li&gt;Execute the loop body.&lt;/li&gt;
&lt;li&gt;Jump back to evaluate the condition again.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The compiler generates conditional and unconditional jump instructions, while the VM executes them using its instruction pointer and operand stack.&lt;/p&gt;

&lt;p&gt;greenServeFE also supports &lt;code&gt;for/in&lt;/code&gt;, nested loops, &lt;code&gt;break&lt;/code&gt;, and &lt;code&gt;continue&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architecture
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.gsve source
     |
   Lexer
     |
   Parser
     |
  Compiler
     |
   Bytecode
     |
    VM
     |
   Output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The engine is implemented in C, with native shared-library modules providing additional capabilities without changing the core language syntax or VM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project:&lt;/strong&gt; greenServeFE - greenServe Fast Execution&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>opensource</category>
    </item>
    <item>
      <title>greenServeFE programming language (open-source project)</title>
      <dc:creator>greenServeFE</dc:creator>
      <pubDate>Wed, 25 Nov 2026 02:48:28 +0000</pubDate>
      <link>https://dev.to/greenservefe/greenservefe-programming-language-open-source-project-785</link>
      <guid>https://dev.to/greenservefe/greenservefe-programming-language-open-source-project-785</guid>
      <description>&lt;h2&gt;
  
  
  What were you building, and why?
&lt;/h2&gt;

&lt;p&gt;I’ve been working on an open-source programming language called &lt;strong&gt;greenServeFE&lt;/strong&gt;. It is a programming language with its own syntax, compiler, virtual machine, and native modules, written primarily in C.&lt;/p&gt;

&lt;p&gt;The project started with a simple idea: I wanted to build something of my own rather than always depending on existing programming languages and frameworks. I was interested in understanding how programming languages actually work behind the scenes. How does a language read source code? How does it understand expressions and functions? How does it execute instructions? How can it interact with the operating system?&lt;/p&gt;

&lt;p&gt;Instead of just reading about these concepts, I decided to build them.&lt;/p&gt;

&lt;p&gt;Over time, greenServeFE grew beyond a small language experiment. I developed its lexer, parser, compiler, bytecode system, and virtual machine. I also started building native C modules that extend what programs written in the language can do.&lt;/p&gt;

&lt;p&gt;One of the most interesting parts of the project has been the HTTP server module. My goal was to let developers build server-side applications using greenServeFE without needing Node.js or another runtime for the application itself.&lt;/p&gt;

&lt;p&gt;The server module supports HTTP routes, request and response objects, middleware, static files, HTML responses, JSON responses, templates, and other server capabilities. I have also been working on improving its underlying implementation.&lt;/p&gt;

&lt;p&gt;I wanted greenServeFE to be more than a syntax demonstration. I wanted people to be able to write actual programs with it.&lt;/p&gt;

&lt;p&gt;I decided to make the project open-source because I want other developers to explore the implementation, understand how it works, report problems, and contribute ideas. I also want the source code to be useful to people who are interested in learning how programming languages and virtual machines are built.&lt;/p&gt;

&lt;h2&gt;
  
  
  What did you expect to happen?
&lt;/h2&gt;

&lt;p&gt;At the beginning, I expected the hardest part would be designing the language syntax and getting the compiler to work.&lt;/p&gt;

&lt;p&gt;I thought that once the parser and virtual machine were working, adding features would become relatively straightforward. I expected to write a few native modules, create examples, and gradually make the language more capable.&lt;/p&gt;

&lt;p&gt;But developing a programming language is different from writing an ordinary application.&lt;/p&gt;

&lt;p&gt;Every feature introduces new interactions with the existing implementation. A change in the parser can affect compilation. A compiler change can affect bytecode execution. A change in the runtime can affect native modules. Even something that looks simple from the user's perspective can require changes across several parts of the system.&lt;/p&gt;

&lt;p&gt;I also expected that documenting the language would be relatively easy. In reality, keeping documentation, examples, module APIs, and actual implementation behavior consistent is another challenge.&lt;/p&gt;

&lt;h2&gt;
  
  
  The moment you realized something was off
&lt;/h2&gt;

&lt;p&gt;One experience that made this especially clear was developing the HTTP server module.&lt;/p&gt;

&lt;p&gt;I could register routes and start the server, but that did not necessarily mean every request-handling feature worked as expected.&lt;/p&gt;

&lt;p&gt;For example, I created an HTML form that submitted customer and product information to a route. The page loaded, the form submitted, and the route executed. However, the values received by the handler were &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;At first, it looked like a small problem with accessing the request object. But it made me realize that I needed to understand the actual server implementation and its request-parsing behavior rather than assume that an API worked in the same way as a familiar framework.&lt;/p&gt;

&lt;p&gt;I started comparing the documentation, examples, and C implementation. I found differences between what was documented and what the implementation supported. I also had to consider whether the installed native module matched the source code I was examining.&lt;/p&gt;

&lt;p&gt;That experience reminded me that a programming language is not just its syntax. The runtime and native modules are equally important.&lt;/p&gt;

&lt;h2&gt;
  
  
  Everything you tried (including what didn't work)
&lt;/h2&gt;

&lt;p&gt;I have approached greenServeFE by building and testing individual components rather than trying to implement everything at once.&lt;/p&gt;

&lt;p&gt;I started with the language itself: lexical analysis, parsing, compilation, and bytecode execution. I then expanded the language with functions, variables, control flow, arrays, objects, and other runtime features.&lt;/p&gt;

&lt;p&gt;After that, I began working on native modules written in C. These modules allow greenServeFE programs to use functionality that would otherwise require implementing everything inside the language.&lt;/p&gt;

&lt;p&gt;I have worked on modules for mathematics, JSON, computation, validation, strings, file operations, cryptography, and other utilities.&lt;/p&gt;

&lt;p&gt;The HTTP server module has been a particularly interesting challenge because it connects the language to real network requests. It requires handling routes, request data, responses, static files, and server configuration.&lt;/p&gt;

&lt;p&gt;I have also spent time improving the developer experience. I want installation to be straightforward, examples to be understandable, and documentation to explain the actual APIs instead of presenting features that do not exist in the implementation.&lt;/p&gt;

&lt;p&gt;Not everything has worked on the first attempt. Some syntax produced parser errors. Some module functions behaved differently from what I expected. Some features required changes to the underlying C implementation.&lt;/p&gt;

&lt;p&gt;I have also had to deal with development-environment limitations. I primarily work on Windows, while much of the building and testing happens in Linux cloud environments. Network reliability and limited computing resources sometimes make it difficult to follow the development workflow I originally planned.&lt;/p&gt;

&lt;p&gt;One thing I have learned is to avoid treating a successful build as proof that a feature is complete. I need to test the actual behavior of the language, including how its components interact.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who did you ask for help?
&lt;/h2&gt;

&lt;p&gt;I have used AI coding assistants as development tools, especially when investigating C implementation details, reviewing compiler behavior, understanding errors, and exploring possible designs.&lt;/p&gt;

&lt;p&gt;However, I still make the architectural decisions for greenServeFE. I decide what the language should look like, what features belong in it, how its APIs should be designed, and which problems need to be solved.&lt;/p&gt;

&lt;p&gt;I also learn by reading source code, comparing implementations, testing examples, and investigating unexpected behavior.&lt;/p&gt;

&lt;p&gt;I am interested in hearing from experienced systems programmers and programming-language developers because there are many areas where I would benefit from a more experienced perspective.&lt;/p&gt;

&lt;p&gt;In particular, I would like feedback on the architecture of the virtual machine, the native module system, memory management, and the HTTP server implementation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where things stand now
&lt;/h2&gt;

&lt;p&gt;greenServeFE is an open-source project with an existing compiler, virtual machine, language syntax, and a growing collection of native modules.&lt;/p&gt;

&lt;p&gt;The HTTP server module is also part of the project. Developers can import it and define routes using greenServeFE functions.&lt;/p&gt;

&lt;p&gt;A simple example looks 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;import server;

func home(req, res) {
    res.html("&amp;lt;h1&amp;gt;Hello from greenServeFE!&amp;lt;/h1&amp;gt;");
}

func status(req, res) {
    res.json({
        ok: true,
        language: "greenServeFE",
        server: "running"
    });
}

server.get("/", home);
server.get("/api/status", status);

server.serve(".", 8080, {
    static: true,
    host: "0.0.0.0"
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The idea is to write the server application in greenServeFE while the underlying HTTP functionality is implemented in C.&lt;/p&gt;

&lt;p&gt;The project is still evolving. I am continuing to improve the runtime, expand native modules, fix inconsistencies, write examples, and make the server more reliable.&lt;/p&gt;

&lt;p&gt;I do not consider it finished just because it can execute programs. There is still a lot of work involved in making a language dependable and comfortable for other developers to use.&lt;/p&gt;

&lt;p&gt;The source code is publicly available, and contributions, bug reports, and technical feedback are welcome.&lt;/p&gt;

&lt;h2&gt;
  
  
  Anything else you want our guests to weigh in on?
&lt;/h2&gt;

&lt;p&gt;I would especially appreciate advice from people who have built programming languages, virtual machines, or native runtimes.&lt;/p&gt;

&lt;p&gt;How do you decide when a language's core architecture is stable enough to focus on expanding its ecosystem?&lt;/p&gt;

&lt;p&gt;What approaches do you recommend for testing a custom virtual machine and native modules, especially when the language and its modules are developed together?&lt;/p&gt;

&lt;p&gt;I would also like to hear about maintaining consistency between documentation, examples, and actual implementation as a project grows.&lt;/p&gt;

&lt;p&gt;Most importantly, I want to know what experienced developers think makes an independently developed programming language worth adopting and contributing to.&lt;/p&gt;

&lt;p&gt;I started greenServeFE because I wanted to understand how programming languages work by building one myself. Now I hope it can become something other developers can learn from, use, and help improve.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project:&lt;/strong&gt; greenServeFE — an open-source programming language written primarily in C.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Source code:&lt;/strong&gt; &lt;a href="https://github.com/MacoraOne/greenServeFE" rel="noopener noreferrer"&gt;https://github.com/MacoraOne/greenServeFE&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  codenewbiestory #opensource #programminglanguages #C #compiler #virtualmachine
&lt;/h1&gt;

</description>
      <category>codenewbiestory</category>
      <category>codenewbie</category>
      <category>ai</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Welcome to the greenServeFE's official Dev account.</title>
      <dc:creator>greenServeFE</dc:creator>
      <pubDate>Wed, 25 Nov 2026 02:44:04 +0000</pubDate>
      <link>https://dev.to/greenservefe/welcome-to-the-greenservefes-official-dev-account-2hnn</link>
      <guid>https://dev.to/greenservefe/welcome-to-the-greenservefes-official-dev-account-2hnn</guid>
      <description></description>
    </item>
  </channel>
</rss>
