🔧 ProgrammierungI Tried This Rust Tool, and It Immediately Made Bash Modern(05.09.2026 um 11:25 Uhr)
🪟 Windows TippsA Clanker Pitted Fedora Against Windows 11. Fedora Won, Mostly(07.09.2026 um 18:33 Uhr)
🔧 ProgrammierungOmarchy Linux Quiz(10.09.2026 um 08:56 Uhr)
🪟 Windows TippsBottles' Founder Has Managed to Run Microsoft 365 on Linux(11.09.2026 um 13:59 Uhr)
🪟 Windows TippsChina Switching from Windows to Linux(24.08.2026 um 22:16 Uhr)
🔧 ProgrammierungI Tried This Rust Tool, and It Immediately Made Bash Modern(05.09.2026 um 11:25 Uhr)
🪟 Windows TippsA Clanker Pitted Fedora Against Windows 11. Fedora Won, Mostly(07.09.2026 um 18:33 Uhr)
🔧 ProgrammierungOmarchy Linux Quiz(10.09.2026 um 08:56 Uhr)
🪟 Windows TippsBottles' Founder Has Managed to Run Microsoft 365 on Linux(11.09.2026 um 13:59 Uhr)
🪟 Windows TippsChina Switching from Windows to Linux(24.08.2026 um 22:16 Uhr)

🔧 Programmierung 🕛 vor 2 Jahren 5 Min Lesezeit
0

Introducing Duwa a Chichewa Programming Language

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht



  • Download the binary that matches your operating system from the latest release.

  • Run Duwa programs using the binary (note that the binary name might vary):




  • CODE
       ./duwa -f path/to/your/program.duwa









    Basic Syntax



    Let me show you some of the basics of Duwa.






    Hello World






    CODE
    ndondomeko pano() {
    lemba("Moni Dziko");
    }

    pano();






    In this example:





    • ndondomeko is how I decided to declare a function in Duwa.


    • lemba, which means "write" in Chichewa, outputs text.

    • The program simply prints "Moni Dziko" ("Hello World") to the screen.






    Variables



    Duwa supports a variety of variable types:




    CODE
    // Numbers
    nambala yoyamba = 1;
    nambala yachiwiri = 2;

    nambala yomaliza = yoyamba + yachiwiri;

    // Strings
    mawu dzina = "Maliko";

    // Maps
    mgwirizano munthu = {
    "dzina": "Soma",
    "zaka": 3
    }

    // Other types like boolean are not strongly typed









    Conditional Statements



    I chose to use ngati for if statements and kapena for else, making the logic flow more naturally in Chichewa:




    CODE
    // If statement
    ngati(yoyamba > yachiwiri) {
    // panga zinthu (do something)
    }

    // If-else statement
    ngati(yoyamba > yachiwiri) {
    // panga zinthu
    } kapena {
    // panga zinthu
    }









    Loops



    Duwa also supports both while and for loops:




    CODE
    // While loop
    pamene(yoyamba > 2) {
    // panga zinthu
    yoyamba++
    }

    // For loop
    za(nambala x = 0; x > 5; x++) {
    // panga zinthu
    }









    Let's Code: Linear Search Example



    To give you a taste of what Duwa can do, here’s a simple linear search algorithm.

    Create a new file called Kufufuza.duwa in your favorite editor




    CODE
    ndondomeko kufufuza(arr, x) {
    za(nambala i = 0; i < arr.length(); i++) {
    ngati (arr[i] == x) {
    bweza i;
    }
    }
    bweza -1;
    }

    ndondomeko doLinearSearch() {
    nambala[] arr = [2, 3, 4, 10, 40];
    nambala x = 10;

    nambala result = kufufuza(arr, x);
    ngati (result == -1) {
    lembanzr("Linear Search: Element is not present in array");
    } kapena {
    lembanzr("Linear Search: Element at index " + result);
    }
    }

    doLinearSearch();






    Run the program by running




    CODE
    duwa -f Kufufuza.duwa






    You will get the index of 10 printed out on your console






    Breaking Down the Code





    1. ndondomeko kufufuza(arr, x): This function performs the linear search. "Kufufuza" means "to search" in Chichewa.

    2. The za loop iterates through the array, checking for the target value.


    3. ngati (arr[i] == x): If the element is found, the function returns its index.

    4. If the element is not found, the function returns -1.


    5. ndondomeko doLinearSearch(): This function sets up the test case and calls the search function.

    6. The result is printed using lembanzr, which I chose to mean "write line."



    This example gives a glimpse of how Duwa handles algorithms while staying true to the Chichewa language.






    Current State of Duwa



    Duwa is still a work in progress, and there are some words and constructs that haven't been fully translated into Chichewa yet. I'm actively working on these translations, and I plan to have everything ready by the time Duwa reaches version 1.0.



    Even in its current state, Duwa is fully functional, and I'm excited to see how it grows as I continue to refine it. I’d love to hear your feedback as you experiment with it!






    Bonus: I created a simple vscode extension for adding support for Duwa to vscode, for now, you will only get syntax highlighting but working on adding more features. Search for Duwa Language in the vscode extension tab, or download

    Check out the (Still a work inprogress)

    Vollständiger Original-Bericht
    Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
    ↗ Original-Artikel auf dev.to lesen
    Wie bewertest du diesen Beitrag?
    1 Klick Feedback
    Teilen mit Netzwerk & Team:

    Community-Analysen & Experten-Meinungen 0

    Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
    Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
    Community Pulse: Relevanz-Einschätzung
    1 Klick Experten-Votum
    🔴 Akute Relevanz 0%
    🟡 In Evaluierung 0%
    🟢 Keine Auswirkung 0%
    Spannende Innovation 0%
    Verwandte Story-Cluster & Quellen (Vektor-KI)
    Port 8095 Engine
    1 Quelle
    KI-Angriffe: Geheimdienste sollen neue Befugnisse erhalten
    1 Quelle
    Podcast: ChatGPT schwatzt Nutzern in Deutschland jetzt Werbung auf
    1 Quelle
    PACMAN: KI-Framework steuert Fusionsplasma in Echtzeit
    Ähnliche Beiträge
    🔍 Verwandte News

    Auch interessante Nachrichten Introducing Duwa a Chichewa Programming Language

    Thematisch verwandte Begriffe: Introducing, Duwa, Chichewa, Programming · 6 Treffer

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...