<?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>Forem: LunaStev</title>
    <description>The latest articles on Forem by LunaStev (@lunastev).</description>
    <link>https://forem.com/lunastev</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%2F2055745%2Fcb413308-7e72-46d0-a13e-33af3a09f354.jpeg</url>
      <title>Forem: LunaStev</title>
      <link>https://forem.com/lunastev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/lunastev"/>
    <language>en</language>
    <item>
      <title>Move Wave Blog</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Wed, 04 Feb 2026 10:05:07 +0000</pubDate>
      <link>https://forem.com/lunastev/move-wave-blog-93l</link>
      <guid>https://forem.com/lunastev/move-wave-blog-93l</guid>
      <description>&lt;p&gt;It's been a few months since the move, but I don't think I posted an announcement here. Wave recently released v0.1.6-pre-beta, and below is the moved Wave blog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.wave-lang.dev/" rel="noopener noreferrer"&gt;https://blog.wave-lang.dev/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>wavelang</category>
    </item>
    <item>
      <title>Introduction to Wave v0.1.4-pre-beta: Add optimization, method chaining, and image file build</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Fri, 01 Aug 2025 03:28:54 +0000</pubDate>
      <link>https://forem.com/lunastev/introduction-to-wave-v014-pre-beta-add-optimization-method-chaining-and-image-file-build-317k</link>
      <guid>https://forem.com/lunastev/introduction-to-wave-v014-pre-beta-add-optimization-method-chaining-and-image-file-build-317k</guid>
      <description>&lt;p&gt;Hello! I'm LunaStev, the developer of Wave.&lt;/p&gt;

&lt;p&gt;We are pleased to announce Wave v0.1.4-pre-beta —&lt;br&gt;
We've added CLI improvements, LLVMO2 optimization, and we've added commands to help build the image file, and we've added the most important feature, Method Chaining.&lt;/p&gt;
&lt;h2&gt;
  
  
  PR and Commits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/212" rel="noopener noreferrer"&gt;[#212]CLI improvements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/213" rel="noopener noreferrer"&gt;[#213]Optimized to pass and -O2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/215" rel="noopener noreferrer"&gt;[#215]Image caption Agregar comandos CLI y palabras clave de Proto para construir archivos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/216" rel="noopener noreferrer"&gt;[#216]Add Method Chaining&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Showcase
&lt;/h2&gt;

&lt;p&gt;The showcase is available at &lt;a href="https://github.com/LunaStev/wave-testing" rel="noopener noreferrer"&gt;Wave-Test&lt;/a&gt;.&lt;/p&gt;



&lt;p&gt;Thank you for using Wave! Stay tuned for future updates and enhancements.&lt;/p&gt;


&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;p&gt;CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wavec run &lt;span class="nt"&gt;--img&lt;/span&gt; main.wave
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Method Chaining:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;i32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="py"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;i32&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="p"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="py"&gt;my_string&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;str&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hello World"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="py"&gt;length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;i32&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;my_string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nf"&gt;println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Result of my_string.len(): {}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Installation Guide
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Download:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download to Curl.
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://wave-lang.dev/install.sh | bash &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--version&lt;/span&gt; v0.1.4-pre-beta
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Verify Installation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a terminal and type:
&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash
wavec --version
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;If the version number displays, the installation was successful.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Contributor
&lt;/h2&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/lunastev"&gt;@lunastev&lt;/a&gt; | 🇰🇷&lt;/p&gt;




&lt;h2&gt;
  
  
  Website
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://wave-lang.dev" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/LunaStev/Wave" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://discord.com/invite/Kuk2qXFjc5" rel="noopener noreferrer"&gt;Community&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>language</category>
      <category>wave</category>
    </item>
    <item>
      <title>Printing Characters via BIOS Using Inline Assembly in Wave</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Sat, 26 Jul 2025 13:14:19 +0000</pubDate>
      <link>https://forem.com/lunastev/printing-characters-via-bios-using-inline-assembly-in-wave-19o8</link>
      <guid>https://forem.com/lunastev/printing-characters-via-bios-using-inline-assembly-in-wave-19o8</guid>
      <description>&lt;p&gt;Wave provides a feature called inline assembly, and today we’re going to use it to directly call the BIOS. The &lt;code&gt;int 0x10&lt;/code&gt; interrupt is one of the most basic video output functions in real mode. By putting &lt;code&gt;0x0E&lt;/code&gt; into the AH register and the character you want to output into the AL register, then calling &lt;code&gt;int 0x10&lt;/code&gt;, the BIOS will display the character on the screen.&lt;/p&gt;

&lt;p&gt;Using this method, we’ll print "Hi!", then perform a line break with CR (0x0D) and LF (0x0A), and finally print "OK".&lt;/p&gt;

&lt;p&gt;Currently, the Wave compiler can only be built on Linux, and by default it only generates executable binaries. It does &lt;strong&gt;not&lt;/strong&gt; directly create a &lt;code&gt;.img&lt;/code&gt; disk image like a bootloader would. However, when Wave compiles, it generates a &lt;code&gt;/target&lt;/code&gt; folder that contains both an LLVM IR file (&lt;code&gt;.ll&lt;/code&gt;) and a Linux binary. Since we want to create BIOS code, we don’t need the Linux binary; instead, we’ll use the &lt;code&gt;temp.ll&lt;/code&gt; file containing the LLVM IR code.&lt;/p&gt;

&lt;p&gt;Wave is currently in its frontend development phase, and for testing purposes it temporarily uses LLVM. LLVM generates LLVM IR, which can then be compiled into an object file or executable for the desired target architecture using the &lt;code&gt;clang&lt;/code&gt; command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Print 'H' using BIOS teletype mode&lt;/span&gt;
    &lt;span class="nf"&gt;asm&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s"&gt;"mov ah, 0x0e"&lt;/span&gt;   &lt;span class="c1"&gt;// AH = 0x0E → BIOS int 0x10 teletype mode&lt;/span&gt;
        &lt;span class="s"&gt;"mov al, 0x48"&lt;/span&gt;   &lt;span class="c1"&gt;// AL = 0x48 → ASCII 'H'&lt;/span&gt;
        &lt;span class="s"&gt;"int 0x10"&lt;/span&gt;       &lt;span class="c1"&gt;// BIOS video service call → prints 'H' and moves cursor&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Print 'i'&lt;/span&gt;
    &lt;span class="nf"&gt;asm&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s"&gt;"mov ah, 0x0e"&lt;/span&gt;
        &lt;span class="s"&gt;"mov al, 0x69"&lt;/span&gt;   &lt;span class="c1"&gt;// ASCII 'i'&lt;/span&gt;
        &lt;span class="s"&gt;"int 0x10"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Print '!'&lt;/span&gt;
    &lt;span class="nf"&gt;asm&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s"&gt;"mov ah, 0x0e"&lt;/span&gt;
        &lt;span class="s"&gt;"mov al, 0x21"&lt;/span&gt;   &lt;span class="c1"&gt;// ASCII '!'&lt;/span&gt;
        &lt;span class="s"&gt;"int 0x10"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Carriage Return (CR)&lt;/span&gt;
    &lt;span class="nf"&gt;asm&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s"&gt;"mov ah, 0x0e"&lt;/span&gt;
        &lt;span class="s"&gt;"mov al, 0x0D"&lt;/span&gt;   &lt;span class="c1"&gt;// CR: move cursor to beginning of line&lt;/span&gt;
        &lt;span class="s"&gt;"int 0x10"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Line Feed (LF)&lt;/span&gt;
    &lt;span class="nf"&gt;asm&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s"&gt;"mov ah, 0x0e"&lt;/span&gt;
        &lt;span class="s"&gt;"mov al, 0x0A"&lt;/span&gt;   &lt;span class="c1"&gt;// LF: move cursor down one line&lt;/span&gt;
        &lt;span class="s"&gt;"int 0x10"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Print 'O'&lt;/span&gt;
    &lt;span class="nf"&gt;asm&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s"&gt;"mov ah, 0x0e"&lt;/span&gt;
        &lt;span class="s"&gt;"mov al, 0x4F"&lt;/span&gt;   &lt;span class="c1"&gt;// ASCII 'O'&lt;/span&gt;
        &lt;span class="s"&gt;"int 0x10"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Print 'K'&lt;/span&gt;
    &lt;span class="nf"&gt;asm&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s"&gt;"mov ah, 0x0e"&lt;/span&gt;
        &lt;span class="s"&gt;"mov al, 0x4B"&lt;/span&gt;   &lt;span class="c1"&gt;// ASCII 'K'&lt;/span&gt;
        &lt;span class="s"&gt;"int 0x10"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, to run this code in a BIOS environment, we need to go through a build process. As mentioned earlier, the Wave compiler doesn’t directly create a &lt;code&gt;.img&lt;/code&gt;, so we need to manually build a boot image using the &lt;code&gt;temp.ll&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;The build steps are as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Generate LLVM IR (&lt;code&gt;temp.ll&lt;/code&gt;) from Wave code:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   wavec run main.wave
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Convert LLVM IR to a 16-bit object file:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   llc &lt;span class="nt"&gt;-march&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;x86 &lt;span class="nt"&gt;-mattr&lt;/span&gt;+16bit-mode &lt;span class="nt"&gt;-filetype&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;obj target/temp.ll &lt;span class="nt"&gt;-o&lt;/span&gt; boot.o
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Link the object file into a bootloader binary:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ld &lt;span class="nt"&gt;-m&lt;/span&gt; elf_i386 &lt;span class="nt"&gt;-Ttext&lt;/span&gt; 0x7c00 &lt;span class="nt"&gt;--oformat&lt;/span&gt; binary boot.o &lt;span class="nt"&gt;-o&lt;/span&gt; boot.bin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Add boot sector signature (0x55AA):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-ne&lt;/span&gt; &lt;span class="s1"&gt;'\x55\xAA'&lt;/span&gt; | &lt;span class="nb"&gt;dd &lt;/span&gt;&lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;boot.bin &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="nv"&gt;seek&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;510 &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2 &lt;span class="nv"&gt;conv&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;notrunc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create the final boot image:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;dd &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;boot.bin &lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;os.img &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;512 &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="nv"&gt;conv&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;notrunc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run with QEMU:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   qemu-system-i386 &lt;span class="nt"&gt;-drive&lt;/span&gt; &lt;span class="nv"&gt;format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;raw,file&lt;span class="o"&gt;=&lt;/span&gt;os.img
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;To automate this process, you can create a &lt;code&gt;build.sh&lt;/code&gt; script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt;

&lt;span class="nv"&gt;LL_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;target/temp.ll
&lt;span class="nv"&gt;OBJ_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;boot.o
&lt;span class="nv"&gt;BIN_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;boot.bin
&lt;span class="nv"&gt;IMG_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;os.img

wavec run main.wave

llc &lt;span class="nt"&gt;-march&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;x86 &lt;span class="nt"&gt;-mattr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;+16bit-mode &lt;span class="nt"&gt;-filetype&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;obj &lt;span class="nv"&gt;$LL_FILE&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nv"&gt;$OBJ_FILE&lt;/span&gt;

ld &lt;span class="nt"&gt;-m&lt;/span&gt; elf_i386 &lt;span class="nt"&gt;-Ttext&lt;/span&gt; 0x7c00 &lt;span class="nt"&gt;--oformat&lt;/span&gt; binary &lt;span class="nv"&gt;$OBJ_FILE&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nv"&gt;$BIN_FILE&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-ne&lt;/span&gt; &lt;span class="s1"&gt;'\x55\xAA'&lt;/span&gt; | &lt;span class="nb"&gt;dd &lt;/span&gt;&lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$BIN_FILE&lt;/span&gt; &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="nv"&gt;seek&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;510 &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2 &lt;span class="nv"&gt;conv&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;notrunc

&lt;span class="nb"&gt;dd &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$BIN_FILE&lt;/span&gt; &lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$IMG_FILE&lt;/span&gt; &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;512 &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="nv"&gt;conv&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;notrunc

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[+] Image created: &lt;/span&gt;&lt;span class="nv"&gt;$IMG_FILE&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, just run &lt;code&gt;./build.sh&lt;/code&gt;, then execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;qemu-system-i386 &lt;span class="nt"&gt;-drive&lt;/span&gt; &lt;span class="nv"&gt;format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;raw,file&lt;span class="o"&gt;=&lt;/span&gt;os.img
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll see &lt;code&gt;Hi!&lt;/code&gt; followed by a line break and &lt;code&gt;OK&lt;/code&gt; displayed in QEMU.&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fpb0sc7s30owv3zhp2xoa.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.amazonaws.com%2Fuploads%2Farticles%2Fpb0sc7s30owv3zhp2xoa.png" alt="qemu" width="717" height="399"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;So far, we’ve seen how to directly call BIOS functions using inline assembly in Wave and print simple strings.&lt;/p&gt;

&lt;p&gt;This example only used basic character output functionality, but you can also call other BIOS interrupts like &lt;code&gt;int 0x16&lt;/code&gt; (keyboard input) in the same way. It’s also possible to directly access VGA memory or expand this into simple bootloader logic.&lt;/p&gt;

&lt;p&gt;Although Wave is still in its early development stage, the ability to call BIOS via inline assembly shows that it can be used for low-level development as well. Next, I plan to experiment further with keyboard input, VGA memory output, and more fun low-level features.&lt;/p&gt;




&lt;p&gt;Github: &lt;a href="https://github.com/LunaStev/Wave" rel="noopener noreferrer"&gt;https://github.com/LunaStev/Wave&lt;/a&gt;&lt;br&gt;
Website: &lt;a href="https://wave-lang.dev" rel="noopener noreferrer"&gt;https://wave-lang.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>wave</category>
      <category>programming</category>
    </item>
    <item>
      <title>Introduction to Wave v0.1.3-pre-beta: Syntax tweaks, bug fixes, and enhanced type and import handling.</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Mon, 14 Jul 2025 06:22:27 +0000</pubDate>
      <link>https://forem.com/lunastev/introduction-to-wave-v013-pre-beta-syntax-tweaks-bug-fixes-and-enhanced-type-and-import-1ad</link>
      <guid>https://forem.com/lunastev/introduction-to-wave-v013-pre-beta-syntax-tweaks-bug-fixes-and-enhanced-type-and-import-1ad</guid>
      <description>&lt;p&gt;Hello! I'm LunaStev, the developer of Wave.&lt;/p&gt;

&lt;p&gt;We are pleased to announce Wave v0.1.3-pre-beta —&lt;br&gt;
We changed the function parameter syntax from semicolons to commas, fixed LLVM IR generation for arrays of pointers and index access, and allowed parameters to have multiple types. We also fixed bugs related to parameter parsing and &lt;code&gt;if&lt;/code&gt; statements, improved inline assembly support for negative values, and restructured the &lt;code&gt;import&lt;/code&gt; system.&lt;/p&gt;

&lt;h2&gt;
  
  
  PR and Commits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/197" rel="noopener noreferrer"&gt;[#197]Change function parameter syntax from semicolon to comma (issue #196)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/199" rel="noopener noreferrer"&gt;[#198]Fix incorrect LLVM IR generation for array of pointers and IndexAccess dereferencing (issue #198)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/201" rel="noopener noreferrer"&gt;[#201]Parameters can have multiple types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/204" rel="noopener noreferrer"&gt;[#204]Param bug fix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/206" rel="noopener noreferrer"&gt;[#206]Handling Inline Assembly Negative Values (issue #205)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/208" rel="noopener noreferrer"&gt;[#208]Troubleshooting if statement bugs in paser&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/210" rel="noopener noreferrer"&gt;[#210]Cambiar la estructura de import&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Showcase
&lt;/h2&gt;

&lt;p&gt;The showcase is available at &lt;a href="https://github.com/LunaStev/wave-testing" rel="noopener noreferrer"&gt;Wave-Test&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;Thank you for using Wave! Stay tuned for future updates and enhancements.&lt;/p&gt;




&lt;h2&gt;
  
  
  Installation Guide
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Download:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download to Curl.
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://wave-lang.dev/install.sh | bash &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--version&lt;/span&gt; v0.1.3-pre-beta
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Verify Installation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a terminal and type:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; wavec &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;If the version number displays, the installation was successful.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Contributor
&lt;/h2&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/lunastev"&gt;@lunastev&lt;/a&gt; | 🇰🇷&lt;/p&gt;




&lt;h2&gt;
  
  
  Website
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://wave-lang.dev" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/LunaStev/Wave" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://discord.com/invite/Kuk2qXFjc5" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;&lt;br&gt;
&lt;a href="https://ko-fi.com/lunasev" rel="noopener noreferrer"&gt;Ko-fi&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>language</category>
      <category>wave</category>
    </item>
    <item>
      <title>Booting from Scratch in Wave: Printing ‘H’ at 0x7C00</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Sat, 12 Jul 2025 04:38:54 +0000</pubDate>
      <link>https://forem.com/lunastev/booting-from-scratch-in-wave-printing-h-at-0x7c00-j32</link>
      <guid>https://forem.com/lunastev/booting-from-scratch-in-wave-printing-h-at-0x7c00-j32</guid>
      <description>&lt;p&gt;Wave is a language that supports inline assembly. In its current pre-beta stage, it compiles through LLVM.&lt;br&gt;
So here's a thought — what if we could write a boot sector in Wave and run it using QEMU?&lt;/p&gt;

&lt;p&gt;If this works, we might just be writing the very first line in Wave’s low-level programming history.&lt;/p&gt;

&lt;p&gt;Today, we’re going to attempt exactly that:&lt;br&gt;
&lt;strong&gt;creating a boot sector using only Wave&lt;/strong&gt;.&lt;/p&gt;



&lt;p&gt;At the moment, Wave uses LLVM as a temporary backend.&lt;br&gt;
LLVM is a general-purpose compiler toolchain used by languages like C/C++, Rust, and Zig.&lt;br&gt;
However, Wave aims to eventually move away from LLVM and build its own dedicated compiler toolchain,&lt;br&gt;
called &lt;strong&gt;Whale&lt;/strong&gt; — optimized specifically for Wave and free from the limitations of LLVM.&lt;/p&gt;

&lt;p&gt;Of course, before that can happen, Wave’s frontend needs to be fully developed.&lt;/p&gt;



&lt;p&gt;In a previous post, I showed how to print “Hello World” using only Wave.&lt;br&gt;
This time, we’ll take it one step further and write a boot sector, which runs below the OS level.&lt;/p&gt;



&lt;p&gt;Typically, boot sectors and bootloaders are written in raw assembly.&lt;br&gt;
But Wave allows inline assembly using the &lt;code&gt;asm {}&lt;/code&gt; block, making it possible to implement a boot sector directly in Wave.&lt;/p&gt;

&lt;p&gt;The basics of Wave’s inline assembly syntax are explained in my earlier post:&lt;br&gt;
&lt;a href="https://dev.to/lunastev/printing-hello-world-from-scratch-in-wave-4oh"&gt;Printing Hello World from Scratch in Wave&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;Here’s the Wave code we’ll be using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fun main() {
    asm {
        "mov ah, 0x0e"
        "mov al, 0x48"
        "int 0x10"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before we proceed, let’s break it down a bit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Breakdown
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;mov ah, 0x0e&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Stores &lt;code&gt;0x0E&lt;/code&gt; in the AH register.&lt;/li&gt;
&lt;li&gt;In x86 real mode, the &lt;code&gt;int 0x10&lt;/code&gt; BIOS interrupt is used for video services.&lt;/li&gt;
&lt;li&gt;When AH = &lt;code&gt;0x0E&lt;/code&gt;, it selects the "TTY character output" function.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;mov al, 0x48&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Stores &lt;code&gt;0x48&lt;/code&gt; (ASCII for &lt;code&gt;'H'&lt;/code&gt;) in the AL register.&lt;/li&gt;
&lt;li&gt;This sets the character to be printed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. &lt;code&gt;int 0x10&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Triggers the BIOS video interrupt.&lt;/li&gt;
&lt;li&gt;AH = &lt;code&gt;0x0E&lt;/code&gt; → TTY mode&lt;/li&gt;
&lt;li&gt;AL = character to print&lt;/li&gt;
&lt;li&gt;BL = page number (defaults to 0)&lt;/li&gt;
&lt;li&gt;As a result, it prints a single &lt;code&gt;'H'&lt;/code&gt; on the screen.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Now that the code is ready, it’s time to compile.&lt;/p&gt;

&lt;p&gt;Currently, Wave only compiles to Linux binaries — formats like &lt;code&gt;.img&lt;/code&gt; or &lt;code&gt;.exe&lt;/code&gt; aren’t directly supported.&lt;br&gt;
However, Wave generates a &lt;code&gt;temp.ll&lt;/code&gt; file (LLVM IR) when running &lt;code&gt;wavec run main.wave&lt;/code&gt;, and we can use that to produce a bootable &lt;code&gt;.img&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;To simplify the process, I’ve written a shell script called &lt;code&gt;build.sh&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt;

&lt;span class="nv"&gt;LL_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;target/temp.ll
&lt;span class="nv"&gt;OBJ_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;boot.o
&lt;span class="nv"&gt;BIN_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;boot.bin
&lt;span class="nv"&gt;IMG_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;os.img

wavec run main.wave

llc &lt;span class="nt"&gt;-march&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;x86 &lt;span class="nt"&gt;-mattr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;+16bit-mode &lt;span class="nt"&gt;-filetype&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;obj &lt;span class="nv"&gt;$LL_FILE&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nv"&gt;$OBJ_FILE&lt;/span&gt;

ld &lt;span class="nt"&gt;-m&lt;/span&gt; elf_i386 &lt;span class="nt"&gt;-Ttext&lt;/span&gt; 0x7c00 &lt;span class="nt"&gt;--oformat&lt;/span&gt; binary &lt;span class="nv"&gt;$OBJ_FILE&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nv"&gt;$BIN_FILE&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-ne&lt;/span&gt; &lt;span class="s1"&gt;'\x55\xAA'&lt;/span&gt; | &lt;span class="nb"&gt;dd &lt;/span&gt;&lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$BIN_FILE&lt;/span&gt; &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="nv"&gt;seek&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;510 &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2 &lt;span class="nv"&gt;conv&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;notrunc

&lt;span class="nb"&gt;dd &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$BIN_FILE&lt;/span&gt; &lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$IMG_FILE&lt;/span&gt; &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;512 &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="nv"&gt;conv&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;notrunc

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[+] Image created: &lt;/span&gt;&lt;span class="nv"&gt;$IMG_FILE&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: You’ll need the LLVM toolchain installed. I recommend using &lt;code&gt;clang 14&lt;/code&gt; for compatibility with Wave.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you run &lt;code&gt;./build.sh&lt;/code&gt;, you’ll get output like this:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fmflx8ffw05d0b7yjzu34.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.amazonaws.com%2Fuploads%2Farticles%2Fmflx8ffw05d0b7yjzu34.png" alt="command" width="779" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;os.img&lt;/code&gt; file is now ready.&lt;/p&gt;

&lt;p&gt;Let’s boot it using QEMU:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;qemu-system-i386 &lt;span class="nt"&gt;-drive&lt;/span&gt; &lt;span class="nv"&gt;format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;raw,file&lt;span class="o"&gt;=&lt;/span&gt;os.img
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see the character &lt;code&gt;'H'&lt;/code&gt; printed to the screen like this:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fot1ymjfkkts6qa760hde.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.amazonaws.com%2Fuploads%2Farticles%2Fot1ymjfkkts6qa760hde.png" alt="qemu" width="721" height="462"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Wave is still a work in progress, but this experiment shows that it's already capable of writing boot sectors through inline assembly.&lt;br&gt;
As the language evolves with more features and syntax improvements, we might one day build entire OS kernels in Wave.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>wave</category>
      <category>boot</category>
    </item>
    <item>
      <title>Printing Hello World from Scratch in Wave</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Fri, 11 Jul 2025 09:57:43 +0000</pubDate>
      <link>https://forem.com/lunastev/printing-hello-world-from-scratch-in-wave-4oh</link>
      <guid>https://forem.com/lunastev/printing-hello-world-from-scratch-in-wave-4oh</guid>
      <description>&lt;p&gt;Wave fundamentally provides &lt;strong&gt;no standard functions&lt;/strong&gt; out of the box. While &lt;code&gt;println()&lt;/code&gt; and &lt;code&gt;print()&lt;/code&gt; do currently exist, they are temporary functions intended for testing during development and are &lt;strong&gt;not official&lt;/strong&gt;. The only officially supported built-in function in Wave is &lt;code&gt;import()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But let’s be honest—if you had to build everything from scratch with no foundation, you probably wouldn't want to use the language. Fortunately, Wave supports a &lt;strong&gt;standard library&lt;/strong&gt;, which allows you to use pre-written library functions. However, in &lt;strong&gt;bare-metal environments&lt;/strong&gt; where standard libraries can't be used, you must implement everything yourself, step by step.&lt;/p&gt;




&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Today, we'll try printing "Hello World" in &lt;strong&gt;Wave with nothing but the bare essentials&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The Wave compiler only provides &lt;strong&gt;syntactic support&lt;/strong&gt;—meaning it doesn't include any functional utilities like &lt;code&gt;syscall()&lt;/code&gt;. Aside from &lt;code&gt;import()&lt;/code&gt;, no functions are provided by default.&lt;/p&gt;

&lt;p&gt;Wave supports &lt;strong&gt;inline assembly&lt;/strong&gt;, written using the &lt;code&gt;asm {}&lt;/code&gt; block.&lt;/p&gt;

&lt;p&gt;Let's quickly go over the basic syntax of inline assembly in Wave.&lt;/p&gt;




&lt;h2&gt;
  
  
  Inline Assembly Syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;asm {
    "assembly instruction"     // actual assembly code line by line
    ...
    in("register") value       // input register mapping
    out("register") variable   // output register mapping
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1. &lt;code&gt;"..."&lt;/code&gt;: Assembly Instructions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;These are raw CPU assembly instructions.&lt;/li&gt;
&lt;li&gt;One instruction per line, multiple lines allowed.&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;"mov rax, 1"&lt;/code&gt;, &lt;code&gt;"syscall"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;in("rdi") s&lt;/code&gt;: Passing Input
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This means the Wave variable &lt;code&gt;s&lt;/code&gt; will be loaded into the &lt;code&gt;rdi&lt;/code&gt; register.&lt;/li&gt;
&lt;li&gt;On x86-64, &lt;code&gt;rdi&lt;/code&gt; is the standard register for the first syscall argument.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;in("register") expression&lt;/code&gt;&lt;br&gt;
-&amp;gt; Loads the given expression into the specified register.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. &lt;code&gt;out("rax") ret&lt;/code&gt;: Receiving Output
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Syscall return values are typically stored in the &lt;code&gt;rax&lt;/code&gt; register.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;out("rax") ret&lt;/code&gt; means: assign the value in &lt;code&gt;rax&lt;/code&gt; to the Wave variable &lt;code&gt;ret&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;out("register") variable&lt;/code&gt;&lt;br&gt;
-&amp;gt; Reads the register's value into the specified Wave variable.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;Now let’s implement &lt;strong&gt;Hello World&lt;/strong&gt; from scratch.&lt;/p&gt;

&lt;p&gt;This is only supported in Wave version &lt;code&gt;v0.1.3-pre-beta-nightly-2025-07-11&lt;/code&gt; and later. The stable release is &lt;code&gt;v0.1.3-pre-beta&lt;/code&gt;. Although major syntax changes are unlikely beyond this version, there may still be some minor differences. For best compatibility, it's recommended to use the &lt;code&gt;v0.1.3-pre-beta&lt;/code&gt; family.&lt;/p&gt;

&lt;p&gt;The first thing we need is a way to measure the &lt;strong&gt;length of a string&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Most programming languages use a &lt;code&gt;len()&lt;/code&gt; function to calculate string length. As mentioned earlier, Wave provides &lt;strong&gt;no built-in functions&lt;/strong&gt; other than &lt;code&gt;import()&lt;/code&gt;, so we’ll implement our own &lt;code&gt;len()&lt;/code&gt; function manually.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fun len(s: str) -&amp;gt; i32 {
    var count: i32 = 0;
    while (s[count] != 0) {
        count = count + 1;
    }
    return count;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This function would typically belong in the standard library and is used to measure the length of a null-terminated string.&lt;/p&gt;






&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fun println_s(s: ptr&amp;lt;i8&amp;gt;) {
    var l: i32 = len(s);
    var ret: ptr&amp;lt;i8&amp;gt;;
    asm {
        "mov rax, 1"
        "syscall"
        in("rdi") 1
        in("rsi") s
        in("rdx") l
        out("rax") ret
    }

    var nl: ptr&amp;lt;i8&amp;gt; = "\n";
    var one: i32 = 1;
    asm {
        "mov rax, 1"
        "syscall"
        in("rdi") 1
        in("rsi") nl
        in("rdx") one
        out("rax") ret
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wave currently includes a temporary testing function called &lt;code&gt;println()&lt;/code&gt;, but to avoid confusion, we’ll define our own version called &lt;code&gt;println_s()&lt;/code&gt; here.&lt;/p&gt;






&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import("println");

fun main() {
    println_s("Hello World");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We use the &lt;code&gt;import()&lt;/code&gt; function to load the &lt;code&gt;println.wave&lt;/code&gt; file. If your &lt;code&gt;main.wave&lt;/code&gt; file already contains the &lt;code&gt;len()&lt;/code&gt; and &lt;code&gt;println_s()&lt;/code&gt; functions, you won’t need to use &lt;code&gt;import()&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;Running this will result in:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Ft8pu99gpwlnbe0ca2sbw.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.amazonaws.com%2Fuploads%2Farticles%2Ft8pu99gpwlnbe0ca2sbw.png" alt="hello" width="632" height="53"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You’ll see the &lt;code&gt;Hello World&lt;/code&gt; output printed like this.&lt;/p&gt;




&lt;p&gt;Wave doesn’t have a complete standard library yet, but the potential is definitely there. By taking full advantage of the compiler’s low-level capabilities, you can already build impressive programs—even today.&lt;/p&gt;




&lt;p&gt;Site: &lt;a href="https://wave-lang.dev/" rel="noopener noreferrer"&gt;https://wave-lang.dev/&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/LunaStev/Wave" rel="noopener noreferrer"&gt;https://github.com/LunaStev/Wave&lt;/a&gt;&lt;br&gt;
Discord: &lt;a href="https://discord.com/invite/Kuk2qXFjc5" rel="noopener noreferrer"&gt;https://discord.com/invite/Kuk2qXFjc5&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>wave</category>
      <category>compiler</category>
    </item>
    <item>
      <title>Wave Language Performance Benchmark: Comparison with C and Rust</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Thu, 10 Jul 2025 07:23:49 +0000</pubDate>
      <link>https://forem.com/lunastev/wave-language-performance-benchmark-comparison-with-c-and-rust-nap</link>
      <guid>https://forem.com/lunastev/wave-language-performance-benchmark-comparison-with-c-and-rust-nap</guid>
      <description>&lt;p&gt;Wave is not aiming to be a "C replacement" like Zig, but it is an independent low-level language distinct from C. It has been under active development for about six months now.&lt;/p&gt;

&lt;p&gt;Currently in its pre-beta phase, Wave still has several bugs and limitations—but that also means there's significant room for improvement. The potential is definitely there.&lt;/p&gt;

&lt;p&gt;According to the roadmap, the frontend of Wave will be completed during the pre-beta stage. In the next phase, alpha, development will begin on Wave’s custom compiler toolchain called Whale, with the goal of moving away from LLVM. The current plan is for Whale to fully replace LLVM and become a highly optimized and independent compiler toolchain tailored specifically for Wave.&lt;/p&gt;

&lt;p&gt;However, Wave also faces some clear challenges:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lack of ecosystem&lt;/strong&gt;: While the concept of Wave has been around for over a year, actual development only began six months ago. As a result, there is no standard library, and there are practically no real-world programs built with it. While algorithmic code is possible, practical application-level development is not. As of version &lt;code&gt;v0.1.2-pre-beta&lt;/code&gt;, even basic input functions like &lt;code&gt;input()&lt;/code&gt; are not yet implemented.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of contributors&lt;/strong&gt;: This is a common issue with all new programming languages. In the very early stages, it's normal to have zero contributors. Often, a single developer drives the entire project based on their own philosophy. That’s just how it is. Compared to existing utility tools, new programming languages attract attention much more slowly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wave is a compiled, low-level language and shouldn’t be compared to Python or JavaScript. It’s not in the same category, and Wave isn’t trying to compete with them either. If we had to choose competitors, &lt;strong&gt;C and Rust&lt;/strong&gt; would be the most appropriate comparisons.&lt;/p&gt;

&lt;p&gt;As mentioned earlier, Wave is still in its early stages, so it’s only natural that it’s significantly slower than both C and Rust. However, running benchmarks and comparing results is a meaningful exercise—it provides motivation and insight into potential optimizations.&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fpc3zomu6945ocmgx9xne.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.amazonaws.com%2Fuploads%2Farticles%2Fpc3zomu6945ocmgx9xne.png" alt="benchmark" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The graph above shows a performance comparison between Wave, C, and Rust. The benchmark measures how long it takes to run a simple string length function &lt;strong&gt;100 million times&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;All three languages were tested using &lt;strong&gt;AOT (ahead-of-time) compilation&lt;/strong&gt;. Note that &lt;strong&gt;Wave does not and will not support JIT&lt;/strong&gt;; it will be AOT-only by design.&lt;/p&gt;

&lt;p&gt;Here are the source codes used for each language:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fun len(s: str) -&amp;gt; i32 {
    var count: i32 = 0;
    while (s[count] != 0) {
        count = count + 1;
    }
    return count;
}

fun main() {
    var message: str = "hello, world!";
    var result: i32 = 0;
    var i: i32 = 0;
    while (i &amp;lt; 100000000) {
        result = result + len(message);
        i = i + 1;
    }
    println("Wave Result: {}", result);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wave does not yet have a time-related library, so execution time was measured using the Linux &lt;code&gt;time&lt;/code&gt; command. Please keep that in mind when interpreting the results.&lt;/p&gt;






&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;time.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"hello, world!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kt"&gt;clock_t&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;clock&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;100000000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="kt"&gt;clock_t&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;clock&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;elapsed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="p"&gt;)(&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;CLOCKS_PER_SEC&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"C Result: %d&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"C Time: %.3f seconds&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;elapsed&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;C is a time-tested language that has been the foundation of many systems and is deeply optimized. It is, without question, one of the most respected and traditional languages in software development.&lt;/p&gt;






&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;time&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Instant&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;hint&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;black_box&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;bytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="nf"&gt;.as_bytes&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;bytes&lt;/span&gt;&lt;span class="nf"&gt;.len&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;usize&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;count&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;black_box&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"hello, world!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Instant&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="mi"&gt;100_000_000&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;duration&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="nf"&gt;.elapsed&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Rust Result: {}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Rust Time: {:.3?}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rust is the language used to implement Wave itself, so of course it's included in the benchmark. Although Rust has only been around for about a decade, it has grown rapidly and now has a thriving ecosystem. While it hasn’t reached the level of C yet, it is without a doubt one of the most promising modern systems languages.&lt;/p&gt;




&lt;p&gt;Some might look at this benchmark and say, "Wow, Wave is incredibly slow!"—and yes, it is slow right now. But don’t forget: Wave is only &lt;strong&gt;six months into development&lt;/strong&gt;. Rust reached its first stable release &lt;strong&gt;after 10 years&lt;/strong&gt; of development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wave is about 5× slower than C, and about 4.2× slower than Rust.&lt;/strong&gt;&lt;br&gt;
However, considering that Wave is still a very young AOT-compiled language, this level of performance is already quite impressive.&lt;br&gt;
Reaching Rust-level performance won't happen overnight, but the &lt;strong&gt;potential is clearly there&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;Site: &lt;a href="https://wave-lang.dev/" rel="noopener noreferrer"&gt;https://wave-lang.dev/&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/LunaStev/Wave" rel="noopener noreferrer"&gt;https://github.com/LunaStev/Wave&lt;/a&gt;&lt;br&gt;
Discord: &lt;a href="https://discord.com/invite/Kuk2qXFjc5" rel="noopener noreferrer"&gt;https://discord.com/invite/Kuk2qXFjc5&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>rust</category>
      <category>benchmark</category>
      <category>compiler</category>
    </item>
    <item>
      <title>Introduction to Wave v0.1.2-pre-beta: Assignment Operators, Added Remainder and Generalized Indexing Support</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Sat, 21 Jun 2025 14:55:18 +0000</pubDate>
      <link>https://forem.com/lunastev/introduction-to-wave-v012-pre-beta-assignment-operators-added-remainder-and-generalized-19kn</link>
      <guid>https://forem.com/lunastev/introduction-to-wave-v012-pre-beta-assignment-operators-added-remainder-and-generalized-19kn</guid>
      <description>&lt;p&gt;Hello! I'm LunaStev, the developer of Wave.&lt;/p&gt;

&lt;p&gt;We are pleased to announce Wave &lt;code&gt;v0.1.2-pre-beta&lt;/code&gt; —&lt;br&gt;
This update supports indexing, supports the rest of the operators. And I added an assignment operator. And I fixed a number of bugs.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✅ Added Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔍 Generalized Indexing Support
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Extended &lt;code&gt;arr[index]&lt;/code&gt; syntax to support &lt;strong&gt;variable indexing&lt;/strong&gt; in any context.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now supports dynamic indexing like &lt;code&gt;arr[i]&lt;/code&gt;, &lt;code&gt;ptr[j]&lt;/code&gt;, &lt;code&gt;get_array()[k]&lt;/code&gt; inside &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, &lt;code&gt;return&lt;/code&gt;, and assignments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Internally handles pointer types (e.g., &lt;code&gt;i8*&lt;/code&gt;) using &lt;code&gt;GEP&lt;/code&gt; and performs automatic type casting (e.g., &lt;code&gt;i8&lt;/code&gt; vs &lt;code&gt;i64&lt;/code&gt;) for comparisons and assignments.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ➕ Added &lt;code&gt;%&lt;/code&gt; (Remainder) Operator Support
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Wave now supports the modulo operator &lt;code&gt;%&lt;/code&gt; for integer types.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Expressions like &lt;code&gt;a % b&lt;/code&gt;, &lt;code&gt;10 % 3&lt;/code&gt;, and &lt;code&gt;var x: i32 = a % b&lt;/code&gt; are now fully parsed and compiled to LLVM IR using srem (signed remainder).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Parser was updated to recognize &lt;code&gt;%&lt;/code&gt; as &lt;code&gt;TokenType::Remainder&lt;/code&gt;, and IR generation uses &lt;code&gt;build_int_signed_rem&lt;/code&gt; for correct runtime behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;%&lt;/code&gt; is fully supported inside expressions, assignments, conditionals, and return statements.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⚙️ Assignment Operators (&lt;code&gt;+=&lt;/code&gt;, &lt;code&gt;-=&lt;/code&gt;, &lt;code&gt;*=&lt;/code&gt;, &lt;code&gt;/=&lt;/code&gt;, &lt;code&gt;%=&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Supports compound assignment operators for both integers (&lt;code&gt;i32&lt;/code&gt;) and floating-point numbers (&lt;code&gt;f32&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Operators implemented: &lt;code&gt;+=&lt;/code&gt;, &lt;code&gt;-=&lt;/code&gt;, &lt;code&gt;*=&lt;/code&gt;, &lt;code&gt;/=&lt;/code&gt;, &lt;code&gt;%=&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Type-safe operation with proper distinction between integer and float IR instructions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;add, sub, mul, sdiv, srem for integers.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fadd&lt;/code&gt;, &lt;code&gt;fsub&lt;/code&gt;, &lt;code&gt;fmul&lt;/code&gt;, &lt;code&gt;fdiv&lt;/code&gt;, &lt;code&gt;frem&lt;/code&gt; (uses &lt;code&gt;fmodf&lt;/code&gt;) for floats.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Implicit type casting during assignment (e.g., assigning an int to a float variable triggers &lt;code&gt;int&lt;/code&gt; → &lt;code&gt;float&lt;/code&gt; conversion).&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Proper LLVM IR generation for all supported operations, including float remainder via external &lt;code&gt;fmodf&lt;/code&gt; call (linked with &lt;code&gt;-lm&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  🐛 Bug Fixes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔢 Accurate Token Differentiation Between Integers and Floats
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Number parsing logic has been overhauled to properly distinguish between integer literals (e.g., &lt;code&gt;42&lt;/code&gt;) and floating-point literals (e.g., &lt;code&gt;3.14&lt;/code&gt;, &lt;code&gt;42.0&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Previously, all numeric literals were parsed as &lt;code&gt;Float(f64)&lt;/code&gt; tokens, even when no decimal point was present.&lt;br&gt;
→ Now, tokens like &lt;code&gt;123&lt;/code&gt; are correctly parsed as &lt;code&gt;Number(i64)&lt;/code&gt;, and &lt;code&gt;123.45&lt;/code&gt; as &lt;code&gt;Float(f64)&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Introduced internal flag &lt;code&gt;is_float&lt;/code&gt; to detect presence of &lt;code&gt;.&lt;/code&gt; during scanning. If found, the number is parsed as a float; otherwise, as an integer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Implemented type-safe error handling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fallbacks to &lt;code&gt;TokenType::Number(0)&lt;/code&gt; or &lt;code&gt;TokenType::Float(0.0)&lt;/code&gt; on parse failure, ensuring the lexer remains stable on malformed input.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;This fix improves downstream type checking, IR generation, and expression evaluation, especially for typed languages like Wave where &lt;code&gt;i64&lt;/code&gt; and &lt;code&gt;f64&lt;/code&gt; must be handled distinctly.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  ✨ Other Changes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🧠 Library and Binary 2 Coexist
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add lib.rs for easy package manager creation, development, and easy access.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Showcase
&lt;/h2&gt;

&lt;p&gt;The showcase is available at &lt;a href="https://github.com/LunaStev/wave-testing" rel="noopener noreferrer"&gt;Wave-Test&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;Thank you for using Wave! Stay tuned for future updates and enhancements.&lt;/p&gt;




&lt;h2&gt;
  
  
  Installation Guide
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Download:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download to Curl.
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://wave-lang.dev/install.sh | bash &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--version&lt;/span&gt; v0.1.2-pre-beta
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Verify Installation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a terminal and type:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; wavec &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;If the version number displays, the installation was successful.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  PR and Commits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/172" rel="noopener noreferrer"&gt;Switch to Github Flow It's still before the 0.1.2-pre-beta release.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/182" rel="noopener noreferrer"&gt;Add simple algorithm examples for bug hunting (issue #178)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/184" rel="noopener noreferrer"&gt;Add simple algorithm examples for bug hunting (issue #178)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/185" rel="noopener noreferrer"&gt;primary expression assignment function fix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/187" rel="noopener noreferrer"&gt;Fix IR generation for if-return and function call assignments&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/194" rel="noopener noreferrer"&gt;Fix inline assembly code generation for statement-level asm blocks (issue #173)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/LunaStev/Wave/pull/195" rel="noopener noreferrer"&gt;Fix expression parser false positives for statement tokens&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Contributor
&lt;/h2&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/lunastev"&gt;@lunastev&lt;/a&gt; | 🇰🇷&lt;/p&gt;




&lt;h2&gt;
  
  
  Website
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://wave-lang.dev" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/LunaStev/Wave" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://discord.com/invite/Kuk2qXFjc5" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;&lt;br&gt;
&lt;a href="https://ko-fi.com/lunasev" rel="noopener noreferrer"&gt;Ko-fi&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>language</category>
      <category>wave</category>
    </item>
    <item>
      <title>Introducing OpenAI C: A Lightweight C Client for OpenAI API</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Fri, 06 Jun 2025 02:18:53 +0000</pubDate>
      <link>https://forem.com/lunastev/introducing-openai-c-a-lightweight-c-client-for-openai-api-22dm</link>
      <guid>https://forem.com/lunastev/introducing-openai-c-a-lightweight-c-client-for-openai-api-22dm</guid>
      <description>&lt;p&gt;Do you love C programming but feel left out from the AI boom?&lt;br&gt;
Say hello to &lt;a href="https://github.com/LunaStev/openai-c" rel="noopener noreferrer"&gt;&lt;code&gt;openai-c&lt;/code&gt;&lt;/a&gt; — a lightweight, dependency-minimal, MIT-licensed C client for the OpenAI Chat API.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ What is &lt;code&gt;OpenAI C&lt;/code&gt;?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;openai-c&lt;/code&gt; is a minimal wrapper around OpenAI’s Chat Completion API, written in pure C11. It lets you send prompts to models like &lt;code&gt;gpt-3.5-turbo&lt;/code&gt; and get back responses — all without leaving your beloved C codebase.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Written entirely in C (C11 standard)&lt;/li&gt;
&lt;li&gt;Supports &lt;code&gt;gpt-3.5-turbo&lt;/code&gt; and customizable model names&lt;/li&gt;
&lt;li&gt;Simple API: &lt;code&gt;openai_init()&lt;/code&gt;, &lt;code&gt;openai_chat()&lt;/code&gt;, &lt;code&gt;openai_cleanup()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Uses &lt;code&gt;libcurl&lt;/code&gt; and &lt;code&gt;cJSON&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Lightweight and fast&lt;/li&gt;
&lt;li&gt;MIT licensed&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧩 Basic Usage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt; &lt;span class="cpf"&gt;"openai.h"&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;openai_init&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"your-api-key"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;openai_chat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, who are you?"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"OpenAI says: %s&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;free&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;openai_cleanup&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📦 Installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/LunaStev/openai-c.git
&lt;span class="nb"&gt;cd &lt;/span&gt;openai-c
&lt;span class="nb"&gt;mkdir &lt;/span&gt;build &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;build
cmake ..
make
&lt;span class="nb"&gt;sudo &lt;/span&gt;make &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📂 Folder Structure
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;openai-c/
├── include/        # openai.h
├── src/            # openai.c
├── examples/       # usage examples
├── CMakeLists.txt
└── LICENSE         # MIT License
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔧 Dependencies
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://curl.se/libcurl/" rel="noopener noreferrer"&gt;libcurl&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/DaveGamble/cJSON" rel="noopener noreferrer"&gt;cJSON&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📜 License
&lt;/h2&gt;

&lt;p&gt;MIT License – free to use, modify, and distribute.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌎 GitHub
&lt;/h2&gt;

&lt;p&gt;👉 Check it out: &lt;a href="https://github.com/LunaStev/openai-c" rel="noopener noreferrer"&gt;https://github.com/LunaStev/openai-c&lt;/a&gt;&lt;/p&gt;

</description>
      <category>openai</category>
      <category>library</category>
      <category>c</category>
      <category>programming</category>
    </item>
    <item>
      <title>Introduction to Wave v0.1.1-pre-beta: Inline Assembly, Pointer Chain, and Array Support</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Mon, 05 May 2025 11:46:33 +0000</pubDate>
      <link>https://forem.com/lunastev/introduction-to-wave-v011-pre-beta-inline-assembly-pointer-chain-and-array-support-474l</link>
      <guid>https://forem.com/lunastev/introduction-to-wave-v011-pre-beta-inline-assembly-pointer-chain-and-array-support-474l</guid>
      <description>&lt;p&gt;Hello! I'm LunaStev, the developer of Wave.&lt;/p&gt;

&lt;p&gt;We are excited to announce Wave &lt;code&gt;v0.1.1-pre-beta&lt;/code&gt; —&lt;br&gt;
This update introduces inline assembly (&lt;code&gt;asm {}&lt;/code&gt;) support, enabling you to write low-level system code directly in Wave, such as making syscalls with direct register manipulation.&lt;/p&gt;

&lt;p&gt;Additionally, Wave now fully supports pointer chaining (&lt;code&gt;ptr&amp;lt;ptr&amp;lt;i32&amp;gt;&amp;gt;&lt;/code&gt;) and array types (&lt;code&gt;array&amp;lt;T, N&amp;gt;&lt;/code&gt;), including index access, address-of operations, and validation of literal lengths — expanding Wave's capability for systems-level and memory-safe programming.&lt;/p&gt;

&lt;p&gt;These improvements bring Wave closer to its vision as a low-level but expressive programming language.&lt;/p&gt;


&lt;h2&gt;
  
  
  ✅ Added Features
&lt;/h2&gt;
&lt;h3&gt;
  
  
  ⚙️ Inline Assembly (&lt;code&gt;asm { ... }&lt;/code&gt;) Support
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Introduced &lt;code&gt;asm { ... }&lt;/code&gt; block syntax to embed raw assembly instructions directly within Wave code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports instruction strings (e.g., &lt;code&gt;"syscall"&lt;/code&gt;) and explicit register constraints via &lt;code&gt;in("reg") var&lt;/code&gt; and &lt;code&gt;out("reg") var&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Variables used in &lt;code&gt;in(...)&lt;/code&gt; are passed into specified registers; variables in &lt;code&gt;out(...)&lt;/code&gt; receive output from registers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports passing literal constants directly to registers (e.g., &lt;code&gt;in("rax") 60&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pointer values (e.g., &lt;code&gt;ptr&amp;lt;i8&amp;gt;&lt;/code&gt;) are correctly passed to registers such as &lt;code&gt;rsi&lt;/code&gt;, enabling low-level syscalls like &lt;code&gt;write&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Internally leverages LLVM's inline assembly mechanism using Intel syntax.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Currently supports single-output only; multiple &lt;code&gt;out(...)&lt;/code&gt; constraints will overwrite each other.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does not yet support clobber lists or advanced constraint combinations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provides essential capability for system-level programming (e.g., making direct syscalls, writing device-level code).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ This is not a fully general-purpose inline ASM facility yet, but it enables practical low-level operations within Wave. Full support is planned for later phases.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  ⚙️ Make pointer chain explicit
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Nested parsing like &lt;code&gt;ptr&amp;lt;i32&amp;gt;&lt;/code&gt;, &lt;code&gt;ptr&amp;lt;ptr&amp;lt;i32&amp;gt;&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can create &lt;code&gt;ptr&amp;lt;T&amp;gt;&lt;/code&gt; for any type (no restrictions on &lt;code&gt;T&lt;/code&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Support for consecutive &lt;code&gt;deref&lt;/code&gt; operations (e.g., &lt;code&gt;deref deref deref&lt;/code&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  ⚙️ Array type complete
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;IndexAccess (&lt;code&gt;numbers[0]&lt;/code&gt;) handling&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ArrayLiteral → Parse into AST and validate length&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AddressOf → Support array literals with address-of values (e.g., &lt;code&gt;[&amp;amp;a, &amp;amp;b]&lt;/code&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirmed that &lt;code&gt;array&amp;lt;T, N&amp;gt;&lt;/code&gt; supports any type as T&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  ✨ Other Changes
&lt;/h2&gt;
&lt;h3&gt;
  
  
  🧠 Library and Binary 2 Coexist
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add lib.rs for easy package manager creation, development, and easy access.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Showcase
&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.amazonaws.com%2Fuploads%2Farticles%2Fztlnl6viv01v682i5bfb.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.amazonaws.com%2Fuploads%2Farticles%2Fztlnl6viv01v682i5bfb.png" alt="Image1description" width="482" height="286"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fynntthfxaym7kt9tehcu.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.amazonaws.com%2Fuploads%2Farticles%2Fynntthfxaym7kt9tehcu.png" alt="Image2description" width="604" height="53"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fgtmjdtfyr816hnmrl6co.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.amazonaws.com%2Fuploads%2Farticles%2Fgtmjdtfyr816hnmrl6co.png" alt="Image3description" width="653" height="308"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Ftlfr8kdhk16lt53ta28m.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.amazonaws.com%2Fuploads%2Farticles%2Ftlfr8kdhk16lt53ta28m.png" alt="Image4description" width="613" height="125"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fga0j88lqycri49jwlbf1.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.amazonaws.com%2Fuploads%2Farticles%2Fga0j88lqycri49jwlbf1.png" alt="Image5description" width="714" height="221"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fnupme4isedzyanzt62e3.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.amazonaws.com%2Fuploads%2Farticles%2Fnupme4isedzyanzt62e3.png" alt="Image6description" width="619" height="77"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fyea1t8bkh2zskw96lpnj.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.amazonaws.com%2Fuploads%2Farticles%2Fyea1t8bkh2zskw96lpnj.png" alt="Image7description" width="800" height="849"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fy331f11w9w3a2ky1xxhz.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.amazonaws.com%2Fuploads%2Farticles%2Fy331f11w9w3a2ky1xxhz.png" alt="Image8description" width="611" height="486"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fej1ak4w1rnkre1t77wm2.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.amazonaws.com%2Fuploads%2Farticles%2Fej1ak4w1rnkre1t77wm2.png" alt="Image9description" width="453" height="88"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Frgfwhra4wy4fmcpyrgq4.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.amazonaws.com%2Fuploads%2Farticles%2Frgfwhra4wy4fmcpyrgq4.png" alt="Image10description" width="603" height="61"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;Thank you for using Wave! Stay tuned for future updates and enhancements.&lt;/p&gt;


&lt;h2&gt;
  
  
  Installation Guide
&lt;/h2&gt;
&lt;h3&gt;
  
  
  For Linux:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Download and Extract:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download the &lt;code&gt;wave-v0.1.1-pre-beta-x86_64-linux-gnu.tar.gz&lt;/code&gt; file from the official source.&lt;/li&gt;
&lt;li&gt;Use the wget command:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; wget https://github.com/LunaStev/Wave/releases/download/v0.1.1-pre-beta/wave-v0.1.1-pre-beta-x86_64-linux-gnu.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Extract the archive:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo tar&lt;/span&gt; &lt;span class="nt"&gt;-xvzf&lt;/span&gt; wave-v0.1.1-pre-beta-x86_64-linux-gnu.tar.gz &lt;span class="nt"&gt;-C&lt;/span&gt; /usr/local/bin
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Setting up LLVMs&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a terminal and type:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update
 &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;llvm-14 llvm-14-dev clang-14 libclang-14-dev lld-14 clang
 &lt;span class="nb"&gt;sudo ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /usr/lib/llvm-14/lib/libLLVM-14.so /usr/lib/libllvm-14.so
 &lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;LLVM_SYS_140_PREFIX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/lib/llvm-14
 &lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Verify Installation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a terminal and type:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; wavec &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;If the version number displays, the installation was successful.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Contributor
&lt;/h2&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/lunastev"&gt;@lunastev&lt;/a&gt; | 🇰🇷&lt;/p&gt;




&lt;h2&gt;
  
  
  Website
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://wave-lang.dev" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/LunaStev/Wave" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://discord.com/invite/Kuk2qXFjc5" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;&lt;br&gt;
&lt;a href="https://ko-fi.com/lunasev" rel="noopener noreferrer"&gt;Ko-fi&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>language</category>
      <category>wave</category>
    </item>
    <item>
      <title>Introduction to Wave v0.1.0-pre-beta: Add Import and UTF-8 Support</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Fri, 02 May 2025 08:58:02 +0000</pubDate>
      <link>https://forem.com/lunastev/introduction-to-wave-v010-pre-beta-add-import-and-utf-8-support-2cid</link>
      <guid>https://forem.com/lunastev/introduction-to-wave-v010-pre-beta-add-import-and-utf-8-support-2cid</guid>
      <description>&lt;p&gt;Hello! I'm LunaStev, the developer of Wave.&lt;/p&gt;

&lt;p&gt;We are very pleased to introduce Wave 'v0.1.0-pre-beta' —&lt;br&gt;
This update supports the import function and UTF-8, allowing you to output other characters, unlike previous versions that only supported ASCII.&lt;/p&gt;


&lt;h2&gt;
  
  
  ✅ Added Features
&lt;/h2&gt;
&lt;h3&gt;
  
  
  📦 Local File Import Support
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Introduced &lt;code&gt;import("...");&lt;/code&gt; statement in Wave syntax.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports importing &lt;code&gt;.wave&lt;/code&gt; source files relative to the current file's directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prevents duplicate imports automatically using an internal &lt;code&gt;HashSet&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Imported files are parsed, converted to AST, and merged into the main program at compile time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enables modular project structure by allowing multi-file composition.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  🔧 Bug Fixes
&lt;/h2&gt;
&lt;h3&gt;
  
  
  🐞 UTF-8 Handling in Lexer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Fixed tokenizer crash on non-ASCII characters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lexer now correctly processes UTF-8 multi-byte characters, enabling support for Korean and other languages in source code.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  🐞 Underscore (&lt;code&gt;_&lt;/code&gt;) Support in Identifiers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Variable and function names can now contain underscores.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lexer now treats identifiers like &lt;code&gt;my_var&lt;/code&gt; or &lt;code&gt;some_function&lt;/code&gt; as valid.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Showcase
&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.amazonaws.com%2Fuploads%2Farticles%2F76knm3i7aukbdh5ku0ps.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.amazonaws.com%2Fuploads%2Farticles%2F76knm3i7aukbdh5ku0ps.png" alt="Image1description" width="419" height="174"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F3tg3dhwbxx86eqm8c06w.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.amazonaws.com%2Fuploads%2Farticles%2F3tg3dhwbxx86eqm8c06w.png" alt="Image2description" width="415" height="326"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fstpwau3ntmiq0xwet0rs.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.amazonaws.com%2Fuploads%2Farticles%2Fstpwau3ntmiq0xwet0rs.png" alt="Image3description" width="637" height="124"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Ffqs2ib0cy9t9zlw3anj1.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.amazonaws.com%2Fuploads%2Farticles%2Ffqs2ib0cy9t9zlw3anj1.png" alt="Image4description" width="304" height="67"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F2eefrefdaxhreb0iss5d.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.amazonaws.com%2Fuploads%2Farticles%2F2eefrefdaxhreb0iss5d.png" alt="Image5description" width="602" height="53"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;Thank you for using Wave! Stay tuned for future updates and enhancements.&lt;/p&gt;


&lt;h2&gt;
  
  
  Installation Guide
&lt;/h2&gt;
&lt;h3&gt;
  
  
  For Linux:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Download and Extract:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download the &lt;code&gt;wave-v0.1.0-pre-beta-x86_64-linux-gnu.tar.gz&lt;/code&gt; file from the official source.&lt;/li&gt;
&lt;li&gt;Use the wget command:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; wget https://github.com/LunaStev/Wave/releases/download/v0.1.0-pre-beta/wave-v0.1.0-pre-beta-x86_64-linux-gnu.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Extract the archive:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo tar&lt;/span&gt; &lt;span class="nt"&gt;-xvzf&lt;/span&gt; wave-v0.1.0-pre-beta-x86_64-linux-gnu.tar.gz &lt;span class="nt"&gt;-C&lt;/span&gt; /usr/local/bin
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Setting up LLVMs&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a terminal and type:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update
 &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;llvm-14 llvm-14-dev clang-14 libclang-14-dev lld-14 clang
 &lt;span class="nb"&gt;sudo ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /usr/lib/llvm-14/lib/libLLVM-14.so /usr/lib/libllvm-14.so
 &lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;LLVM_SYS_140_PREFIX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/lib/llvm-14
 &lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Verify Installation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a terminal and type:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; wavec &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;If the version number displays, the installation was successful.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Contributor
&lt;/h2&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/lunastev"&gt;@lunastev&lt;/a&gt; | 🇰🇷&lt;/p&gt;




&lt;h2&gt;
  
  
  Website
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://wave-lang.dev" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/LunaStev/Wave" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://ko-fi.com/lunasev" rel="noopener noreferrer"&gt;Ko-fi&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>language</category>
      <category>wave</category>
    </item>
    <item>
      <title>Introduction to Loa v0.0.1-alpha: Release the first version</title>
      <dc:creator>LunaStev</dc:creator>
      <pubDate>Sun, 27 Apr 2025 15:08:25 +0000</pubDate>
      <link>https://forem.com/lunastev/introduction-to-loa-v001-alpha-release-the-first-version-25bl</link>
      <guid>https://forem.com/lunastev/introduction-to-loa-v001-alpha-release-the-first-version-25bl</guid>
      <description>&lt;p&gt;Hello! I'm LunaStev, the developer of Wave.&lt;/p&gt;

&lt;p&gt;We are excited to launch Loa 'v0.0.1-alpha' —&lt;br&gt;
Loa is a programming language focused on simplicity, readability, and ease of use. It is an interpreted language with a clean and minimal syntax, designed to make programming accessible and straightforward. &lt;/p&gt;

&lt;p&gt;Loa supports basic programming constructs such as variables, conditionals, loops, and functions, making it suitable for a wide range of general-purpose tasks.&lt;/p&gt;




&lt;h2&gt;
  
  
  📐 Language Specification Updates
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🧠 Basic Syntax and Structure Introduced
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Loa now supports essential language features for scripting and simple application development:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Variable assignment without type declaration (e.g., x = 10)&lt;/li&gt;
&lt;li&gt;Indentation-based block structure (no {} needed)&lt;/li&gt;
&lt;li&gt;UTF-8 fully supported for strings (e.g., Korean, Japanese)&lt;/li&gt;
&lt;li&gt;Basic expressions with arithmetic and comparison operators&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;This foundation enables readable, simple, and lightweight coding experiences.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  ✅ Added Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🧠 Core Language Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Lexer, Parser, and Interpreter fully implemented&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Support for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Variable assignment&lt;/li&gt;
&lt;li&gt;Arithmetic operations (+, -, *, /)&lt;/li&gt;
&lt;li&gt;Comparison operations (&amp;lt;, &amp;gt;, ==, !=)&lt;/li&gt;
&lt;li&gt;print function with multiple arguments&lt;/li&gt;
&lt;li&gt;while loops&lt;/li&gt;
&lt;li&gt;if / else if / else conditional structures&lt;/li&gt;
&lt;li&gt;Unicode (UTF-8) string handling&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  🧠 REPL (Read-Eval-Print Loop) Environment
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Interactive REPL for immediate code execution&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports variable declarations and expressions inside REPL&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🔧 Bug Fixes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🐞 UTF-8 Handling in Lexer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Fixed issues where non-ASCII characters (e.g., Korean) caused tokenizer crashes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lexer now correctly advances and peeks UTF-8 multi-byte characters&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🐞 Indentation-Based Block Parsing
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Fixed parsing issues where inconsistent Indent/Dedent handling caused parsing failures&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Parser now correctly recognizes Indentation as block start/end&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ✨ Other Changes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🧠 WaveError-based Error System Integration
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Syntax errors now use a structured error format&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Error messages include file name, line, and column information (basic version)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🧠 Initial Target Binary Releases
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Built binaries for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Linux aarch64&lt;/li&gt;
&lt;li&gt;Linux x86_64 (GNU and MUSL)&lt;/li&gt;
&lt;li&gt;Windows x86_64&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;p&gt;Thank you for using Loa! Stay tuned for future updates and enhancements.&lt;/p&gt;




&lt;h2&gt;
  
  
  Contributor
&lt;/h2&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/lunastev"&gt;@lunastev&lt;/a&gt; | 🇰🇷&lt;/p&gt;




&lt;h2&gt;
  
  
  Website
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://wave-lang.dev" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/LunaStev/Loa" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://ko-fi.com/lunasev" rel="noopener noreferrer"&gt;Ko-fi&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>language</category>
      <category>loa</category>
    </item>
  </channel>
</rss>
