<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged language</title>
<link>https://coderlegion.com/tag/language</link>
<description>Powered by Question2Answer</description>
<item>
<title>Writing a Programming Language &amp; Native x86-64 Compiler from Scratch in C: The Story of Yolish</title>
<link>https://coderlegion.com/28765/writing-a-programming-language-native-x86-64-compiler-from-scratch-in-the-story-of-yolish</link>
<description>&lt;p&gt;Every programmer has, at some point, looked at their favorite programming language and thought: &lt;/p&gt;
&lt;p&gt;&lt;em&gt;“Why was it designed this way? How hard can it actually be to build one myself?”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Most developers who explore language design stop at simple arithmetic evaluators or toy interpreters. But when I was building &lt;strong&gt;Exploidus OS&lt;/strong&gt;—a custom x86-64 reactive capability operating system—I ran into a fundamental architectural barrier:&lt;/p&gt;
&lt;p&gt;Standard systems languages (like C) have zero concept of operating-system capability tokens. In C, if you have a pointer, you can dereference it. If you have an address space, any line of code can call any syscall unless restricted by complex external sandboxes.&lt;/p&gt;
&lt;p&gt;I wanted a modern, expressive language that felt as ergonomic as Python or Rust, but was deeply &lt;strong&gt;capability-aware&lt;/strong&gt; at the syntax level—able to compile directly to bare-metal x86-64 binaries without pulling in gigabytes of LLVM dependencies.&lt;/p&gt;
&lt;p&gt;That ambition gave birth to &lt;strong&gt;Yolish&lt;/strong&gt;—a fast, expressive, capability-aware programming language with a tree-walking interpreter, a bytecode virtual machine, and a direct x86-64 native compiler.&lt;/p&gt;
&lt;p&gt;Here is how I designed Yolish, wrote its compiler from scratch in pure C, and what I learned building a complete language ecosystem.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;1-language-design-ergonomics-meets-systems-control&quot;&gt;1. Language Design: Ergonomics Meets Systems Control&lt;/h3&gt;
&lt;p&gt;When designing Yolish's syntax (&lt;code&gt;.y&lt;/code&gt;), I wanted code to read cleanly without syntactic noise, while enforcing defensive systems programming invariants.&lt;/p&gt;
&lt;h4 id=&quot;immutability-by-default&quot;&gt;Immutability by Default&lt;/h4&gt;
&lt;p&gt;Variables in Yolish default to immutable constants using &lt;code&gt;let&lt;/code&gt;, while mutable state must be explicitly declared using &lt;code&gt;var&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yolish&quot;&gt;let name  = &quot;Yolish&quot;   -- immutable constant
var count = 0          -- mutable state
count = count + 1
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;pattern-matching-with-ranges-amp-guards&quot;&gt;Pattern Matching with Ranges &amp;amp; Guards&lt;/h4&gt;
&lt;p&gt;Instead of archaic C-style &lt;code&gt;switch&lt;/code&gt; statements with fallthrough bugs, Yolish features expressive pattern matching:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yolish&quot;&gt;let grade = match score {
    90..100      =&amp;gt; &quot;A&quot;
    80..90       =&amp;gt; &quot;B&quot;
    n if n &amp;gt;= 60 =&amp;gt; &quot;C&quot;
    _            =&amp;gt; &quot;F&quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;structs-and-impl-blocks&quot;&gt;Structs and &lt;code&gt;impl&lt;/code&gt; Blocks&lt;/h4&gt;
&lt;p&gt;Yolish rejects complex class hierarchies in favor of data-first structs and explicit method implementations:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yolish&quot;&gt;struct Circle { radius }

impl Circle {
    fn area(self) {
        return y.math.pi * self.radius * self.radius
    }
}

let c = Circle { radius: 5 }
y.println(c.area())
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;2-bridging-code-to-the-kernel-first-class-capabilities&quot;&gt;2. Bridging Code to the Kernel: First-Class Capabilities&lt;/h3&gt;
&lt;p&gt;Because Yolish is the official userspace language for Exploidus OS, security cannot be an afterthought. &lt;/p&gt;
&lt;p&gt;In Yolish, dangerous operations (network access, raw disk writes, peripheral I/O) are gated by &lt;strong&gt;declarative capability annotations&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yolish&quot;&gt;@cap(net.read, fs.write)
fn sync_data(url, filepath) {
    let payload = y.net.get(url)
    y.fs.write(filepath, payload)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When compiled for Exploidus OS, the Yolish compiler inspects these annotations and validates them against the process's cryptographic capability table. If an unprivileged function attempts to make an unauthorized syscall, the operation is blocked before execution even reaches kernel space.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;3-the-tri-engine-architecture-interpreter-bytecode-vm-and-native-compiler&quot;&gt;3. The Tri-Engine Architecture: Interpreter, Bytecode VM, and Native Compiler&lt;/h3&gt;
&lt;p&gt;Building a language engine involves tough tradeoffs. Tree-walking interpreters are easy to write but slow. Bytecode VMs are fast and portable. Native compilers deliver maximum speed but are deeply architecture-specific.&lt;/p&gt;
&lt;p&gt;Instead of choosing one, &lt;strong&gt;Yolish implements all three&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Source Code (.y)
       |
    [Lexer] -&amp;gt; Tokens
       |
   [Parser] -&amp;gt; Abstract Syntax Tree (AST)
       |
       +---&amp;gt; Tree-Walking Interpreter  (`ys file.y` - Instant startup)
       |
       +---&amp;gt; Bytecode Compiler &amp;amp; VM    (`ys vm file.y` - High speed execution)
       |
       +---&amp;gt; Direct x86-64 Machine Code (`ys -c file.y` - Standalone binaries)
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The Interactive Interpreter (&lt;code&gt;ys file.y&lt;/code&gt;):&lt;/strong&gt; Evaluates the AST directly. Perfect for quick scripts, one-liners, and the interactive REPL.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Bytecode VM (&lt;code&gt;ys vm file.y&lt;/code&gt;):&lt;/strong&gt; Compiles the AST into an optimized instruction stream executed by a custom register/stack-based virtual machine.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Native x86-64 Compiler (&lt;code&gt;ys -c file.y&lt;/code&gt;):&lt;/strong&gt; Generates real machine code instructions (&lt;code&gt;MOV&lt;/code&gt;, &lt;code&gt;ADD&lt;/code&gt;, &lt;code&gt;CALL&lt;/code&gt;, &lt;code&gt;RET&lt;/code&gt;, SSE2 float operations) directly into executable binary containers.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3 id=&quot;4-no-llvm-no-bloat-direct-multi-platform-binary-emission&quot;&gt;4. No LLVM, No Bloat: Direct Multi-Platform Binary Emission&lt;/h3&gt;
&lt;p&gt;Most modern compiler projects delegate code generation to LLVM. While LLVM is powerful, it is also a massive, multi-gigabyte dependency with slow compilation times.&lt;/p&gt;
&lt;p&gt;I wanted the Yolish toolchain (&lt;code&gt;ys&lt;/code&gt;) to be a single, self-contained C binary with zero external dependencies. You can clone the repo and compile the entire language toolchain with a single &lt;code&gt;make&lt;/code&gt; command using standard &lt;code&gt;gcc&lt;/code&gt; or &lt;code&gt;clang&lt;/code&gt; in seconds.&lt;/p&gt;
&lt;p&gt;To achieve this without LLVM, Yolish writes binary headers and machine code directly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Linux ELF64:&lt;/strong&gt; Directly formats ELF headers, program headers (&lt;code&gt;PT_LOAD&lt;/code&gt;), &lt;code&gt;.text&lt;/code&gt; sections, and Linux syscall dispatchers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Windows PE32+:&lt;/strong&gt; Generates valid Portable Executable (PE32+) headers, image import directories, and embeds Windows application icons.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;macOS Mach-O:&lt;/strong&gt; Generates 64-bit Mach-O load commands (&lt;code&gt;LC_SEGMENT_64&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can cross-compile for any major operating system with a single CLI flag:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ys -c app.y --target linux    # Emits static Linux ELF64 binary
ys -c app.y --target windows  # Emits Windows PE32+ .exe
ys -c app.y --target macos    # Emits macOS Mach-O binary
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;5-runtime-architecture-mark-and-sweep-garbage-collection&quot;&gt;5. Runtime Architecture: Mark-and-Sweep Garbage Collection&lt;/h3&gt;
&lt;p&gt;A systems language with dynamic strings and closures needs safe, automatic memory reclamation.&lt;/p&gt;
&lt;p&gt;Yolish implements a custom &lt;strong&gt;Mark-and-Sweep Garbage Collector (GC)&lt;/strong&gt; written from scratch in C:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Root Scanning:&lt;/strong&gt; Traverses the active call frame stack, global environment variables, and the VM operand stack to identify all actively reachable pointers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mark Phase:&lt;/strong&gt; Recursively traverses heap-allocated objects (strings, dynamic arrays, closures, struct instances), setting the GC mark bit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sweep Phase:&lt;/strong&gt; Scans the global heap allocation pool. Any block whose mark bit is zero was unreachable; it is freed back to the system memory pool, while surviving objects have their mark bits cleared for the next cycle.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Developers have full programmatic introspection into memory usage via &lt;code&gt;gc.stats()&lt;/code&gt; and can trigger explicit collection via &lt;code&gt;gc.collect()&lt;/code&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;6-a-tooling-first-philosophy&quot;&gt;6. A Tooling-First Philosophy&lt;/h3&gt;
&lt;p&gt;A great programming language is more than just a syntax parser; it is an entire developer experience. &lt;/p&gt;
&lt;p&gt;Too many new languages fail because they require third-party formatters, linter plugins, and package wrappers before you can write a serious project. &lt;/p&gt;
&lt;p&gt;From day one, Yolish was designed with a &lt;strong&gt;tooling-first philosophy&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Built-in Test Runner (&lt;code&gt;ys test file.y&lt;/code&gt;):&lt;/strong&gt; Write native &lt;code&gt;test&lt;/code&gt; blocks alongside code and execute them without third-party frameworks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Static Checker (&lt;code&gt;ys check file.y&lt;/code&gt;):&lt;/strong&gt; Performs static semantic analysis, flags undefined variables, and detects type mismatches before runtime.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Code Formatter (&lt;code&gt;ys fmt file.y&lt;/code&gt;):&lt;/strong&gt; Enforces an opinionated, canonical code style across codebases.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interactive REPL (&lt;code&gt;ys&lt;/code&gt;):&lt;/strong&gt; Instant feedback loop with color-highlighted evaluation.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;7-what-writing-a-compiler-in-c-teaches-you&quot;&gt;7. What Writing a Compiler in C Teaches You&lt;/h3&gt;
&lt;p&gt;Writing a programming language and compiler from scratch in pure C is one of the most humbling and rewarding journeys in software engineering:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Memory Discipline:&lt;/strong&gt; Managing AST nodes, symbol tables, and lexical scopes in C forces you to understand every single byte you allocate. Memory leaks in a compiler slow down compilation; memory corruption in code generation crashes the output binary.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Magic of Abstraction:&lt;/strong&gt; When you write the code that translates a simple &lt;code&gt;if (x &amp;gt; 10)&lt;/code&gt; into a &lt;code&gt;CMP&lt;/code&gt; and &lt;code&gt;JLE&lt;/code&gt; assembly jump, you demystify how computers actually think. You realize that high-level abstractions are not magic; they are just structured transformations of intent.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Simplicity Over Complexity:&lt;/strong&gt; Features are easy to add to a grammar; keeping the language coherent, orthogonal, and bug-free across interpretation and native compilation is where the real engineering happens.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3 id=&quot;conclusion-amp-open-source&quot;&gt;Conclusion &amp;amp; Open Source&lt;/h3&gt;
&lt;p&gt;Yolish started as a specialized language project for Exploidus OS, but has evolved into a versatile, cross-platform programming environment with its own native compiler, VM, and standard library.&lt;/p&gt;
&lt;p&gt;The entire project is 100% open-source under the MIT license:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/rahadbhuiya/Yolish&quot;&gt;https://github.com/rahadbhuiya/Yolish&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Supported Platforms:&lt;/strong&gt; Linux, Windows, macOS, and Exploidus OS.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Download the binary, try out the REPL, write a script, and inspect the C compiler source!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Have you ever thought about designing a programming language? What is the one feature you wish your daily language had? Let's discuss in the comments below!&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/28765/writing-a-programming-language-native-x86-64-compiler-from-scratch-in-the-story-of-yolish</guid>
<pubDate>Sun, 27 Sep 2026 03:56:49 +0000</pubDate>
</item>
<item>
<title>What Was Your First Programming Language?</title>
<link>https://coderlegion.com/26338/what-was-your-first-programming-language</link>
<description>&lt;p&gt;Once upon a time there was a kid and an IBM PS/2. I was 11, armed with QBasic By Example (1993) and way too much curiosity for my own good. That book became my doorway into programming. PRINT loops, GOTO chaos, line numbers, and the thrill of watching a computer do exactly what I told it to, or crash spectacularly when I didn’t.&lt;/p&gt;
&lt;p&gt;From there was a quick jump into C and later C++. I didn’t know it at the time, but that little QBasic book had already wired my brain for how code behaves, not just how it looks on the page. Moving into C felt like leveling up. Suddenly I had pointers, headers, real control flow, and enough rope to hang myself with. The best part was being able to compile and link my own .exe files and give them to friends. &lt;/p&gt;
&lt;p&gt;C++ came next, bringing classes, objects, and a whole new way of thinking about structure. Moving from procedural programming into OOP was a huge step and tough to learn... I wont discuss my frustration with pointers...&lt;/p&gt;
&lt;p&gt;Eventually I landed in C#, which felt like the modern, sane evolution of everything I’d learned up to that point. It had the structure I liked from C++, the clarity I wished C had, and enough guardrails to let me focus on building instead of fighting the language. It’s been home ever since.&lt;/p&gt;
&lt;p&gt;What kicked off your programming life?&lt;br&gt;
Was it Python? JavaScript? TI‑BASIC on a calculator? Scratch? Something weird and obscure?&lt;br&gt;
Drop your first language and your age when you started — I want to see how everyone’s path compares.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/26338/what-was-your-first-programming-language</guid>
<pubDate>Sun, 06 Sep 2026 21:21:42 +0000</pubDate>
</item>
<item>
<title>Running a 56M-Parameter LLM on Just Three ESP32 Boards</title>
<link>https://coderlegion.com/24088/running-a-56m-parameter-llm-on-just-three-esp32-boards</link>
<description>
&lt;p&gt;When I was a kid, I loved the movie &lt;em&gt;WALL&amp;middot;E&lt;/em&gt;. I often wondered if something like that would be possible in the future.&lt;/p&gt;

&lt;p&gt;As I grew up, I learned how robots work and how much it costs to build one. I realized that building intelligent machines isn't just about software&amp;mdash;it's also about overcoming hardware limitations.&lt;/p&gt;

&lt;p&gt;Projects like this remind me that we're slowly bringing intelligence to even the smallest devices.&lt;/p&gt;

&lt;p&gt;When people talk about running AI locally, they usually mean a laptop with a decent GPU, a Raspberry Pi, or an NVIDIA Jetson.&lt;/p&gt;

&lt;p&gt;Microcontrollers rarely enter this type of conversation.&lt;/p&gt;

&lt;p&gt;After all, an ESP32-S3 only has a few megabytes of memory. Running a language model on it sounds impossible.&lt;/p&gt;

&lt;p&gt;I saw a post about running an LLM on an ESP32 by &lt;a href=&quot;https://x.com/slvDev&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;slvDev&lt;/a&gt;, and I was fascinated by it.&lt;/p&gt;

&lt;p&gt;Then I came across another project by &lt;a href=&quot;https://github.com/wladimiravila&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;Wladimir Avila&lt;/a&gt;, which took the idea even further.&lt;/p&gt;

&lt;p&gt;Instead of asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&quot;How can we fit a bigger model on one ESP32?&quot;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&quot;What if multiple ESP32 boards worked together like a tiny AI cluster?&quot;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's exactly what &lt;strong&gt;esp32s3-distributed-ai&lt;/strong&gt; does.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Modern language models are huge.&lt;/p&gt;

&lt;p&gt;Even &quot;small&quot; language models often require tens or hundreds of megabytes of memory, which is far beyond what an ESP32-S3 can provide.&lt;/p&gt;

&lt;p&gt;Buying more powerful hardware is the obvious solution.&lt;/p&gt;

&lt;p&gt;But this project explores another idea:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Split the model across multiple microcontrollers.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Rather than forcing one board to hold the entire model, each board becomes responsible for a different part of the inference pipeline. The boards then communicate wirelessly to generate text together.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hardware
&lt;/h2&gt;

&lt;p&gt;The setup is surprisingly simple.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3 &amp;times; ESP32-S3 N16R8 boards&lt;/li&gt;
&lt;li&gt;ESP-NOW for communication&lt;/li&gt;
&lt;li&gt;One board hosts a Wi-Fi access point&lt;/li&gt;
&lt;li&gt;A browser-based interface to interact with the model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No cloud.&lt;/p&gt;

&lt;p&gt;No router.&lt;/p&gt;

&lt;p&gt;No internet connection after flashing the firmware.&lt;/p&gt;

&lt;p&gt;Everything runs locally.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Model Is Split
&lt;/h2&gt;

&lt;p&gt;Instead of storing the entire transformer on one board, the project partitions it.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;             Prompt

                &amp;#9474;

         Board C (Web UI)

                &amp;#9474;

         Board A (Embeddings)

                &amp;#9474;

      Board B (Transformer)

                &amp;#9474;

      Board A (Output Head)

                &amp;#9474;

         Board C (Browser)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each board has a specific responsibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Board A&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Embeddings&lt;/li&gt;
&lt;li&gt;Output head&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Board B&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transformer layers&lt;/li&gt;
&lt;li&gt;KV cache stored in PSRAM&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Board C&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remaining embedding table&lt;/li&gt;
&lt;li&gt;Wi-Fi access point&lt;/li&gt;
&lt;li&gt;Web interface&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The boards exchange intermediate activations over ESP-NOW until the next token is generated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why ESP-NOW?
&lt;/h2&gt;

&lt;p&gt;One of the most interesting design decisions is the communication layer.&lt;/p&gt;

&lt;p&gt;Instead of using MQTT, TCP sockets, or a router, the project relies on &lt;strong&gt;ESP-NOW&lt;/strong&gt;, Espressif's lightweight peer-to-peer wireless protocol.&lt;/p&gt;

&lt;p&gt;Advantages include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No external infrastructure&lt;/li&gt;
&lt;li&gt;Low communication overhead&lt;/li&gt;
&lt;li&gt;Direct board-to-board messaging&lt;/li&gt;
&lt;li&gt;Fully offline operation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;According to the author, the boards communicate through a custom protocol built on top of ESP-NOW, with Board C simultaneously hosting the browser interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  A 56 Million Parameter Model
&lt;/h2&gt;

&lt;p&gt;The project runs a language model with approximately &lt;strong&gt;56 million parameters&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To make this possible, it uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;4-bit and 8-bit quantization&lt;/li&gt;
&lt;li&gt;Split Per-Layer Embeddings (Split-PLE)&lt;/li&gt;
&lt;li&gt;Flash memory for large embedding tables&lt;/li&gt;
&lt;li&gt;PSRAM for the KV cache&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These optimizations allow a model that would never fit on a single board to execute across three inexpensive microcontrollers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspired by Previous Work
&lt;/h2&gt;

&lt;p&gt;This project builds upon another impressive experiment by &lt;a href=&quot;https://x.com/slvDev&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;slvDev&lt;/a&gt;, who demonstrated that a &lt;strong&gt;28.9 million-parameter&lt;/strong&gt; language model could run on a single ESP32-S3.&lt;/p&gt;

&lt;p&gt;That work introduced the use of &lt;strong&gt;Per-Layer Embeddings (PLE)&lt;/strong&gt;, inspired by Google's Gemma architecture, to dramatically reduce SRAM requirements by storing most embedding parameters in flash memory.&lt;/p&gt;

&lt;p&gt;The distributed version extends that idea even further by partitioning the model across multiple devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current Limitations
&lt;/h2&gt;

&lt;p&gt;The project is still experimental.&lt;/p&gt;

&lt;p&gt;Some of the current limitations mentioned by the author include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Brute-force tokenizer implementation&lt;/li&gt;
&lt;li&gt;Quality loss from aggressive 4-bit quantization&lt;/li&gt;
&lt;li&gt;Generating relatively short responses (around 30 words)&lt;/li&gt;
&lt;li&gt;Focusing on demonstrating distributed inference rather than competing with larger LLMs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;The most exciting part isn't that three ESP32 boards can generate text.&lt;/p&gt;

&lt;p&gt;It's the engineering mindset behind it.&lt;/p&gt;

&lt;p&gt;Instead of scaling &lt;strong&gt;up&lt;/strong&gt;, this project scales &lt;strong&gt;out&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Rather than purchasing more powerful hardware, it distributes computation across multiple low-cost devices.&lt;/p&gt;

&lt;p&gt;That idea could inspire future work in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Offline robotics&lt;/li&gt;
&lt;li&gt;Smart factories&lt;/li&gt;
&lt;li&gt;Distributed IoT intelligence&lt;/li&gt;
&lt;li&gt;Edge AI&lt;/li&gt;
&lt;li&gt;TinyML research&lt;/li&gt;
&lt;li&gt;Sensor networks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As embedded AI becomes more common, approaches like this could make sophisticated models accessible on hardware that costs only a few dollars.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This isn't about replacing ChatGPT.&lt;/p&gt;

&lt;p&gt;It's about pushing the boundaries of what's possible on resource-constrained hardware.&lt;/p&gt;

&lt;p&gt;Seeing three inexpensive ESP32 boards collaborate to run a 56M-parameter language model is a reminder that innovation often comes from clever system design&amp;mdash;not just bigger GPUs.&lt;/p&gt;

&lt;p&gt;Projects like this show that the future of AI won't exist only in massive data centers. It may also live on tiny devices working together at the edge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Repository&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/wladimiravila/esp32s3-distributed-ai&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;https://github.com/wladimiravila/esp32s3-distributed-ai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

&lt;p&gt;I'm Ganesh, and I'm building MakeSense, an AI tool that turns public GitHub pull requests into concise summaries, prioritized insights, and interactive quizzes. It's free, unlimited, and source-available. If you review open-source code, I'd love for you to give it a try and share your feedback.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MakeSense:&lt;/strong&gt; &lt;a href=&quot;https://makesensegithub.com/&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;https://makesensegithub.com/&lt;/a&gt;&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/24088/running-a-56m-parameter-llm-on-just-three-esp32-boards</guid>
<pubDate>Mon, 10 Aug 2026 08:44:29 +0000</pubDate>
</item>
<item>
<title>Whizz: Your Esoteric Language that's Short as BF, but Easier to Write</title>
<link>https://coderlegion.com/23827/whizz-your-esoteric-language-thats-short-as-bf-but-easier-to-write</link>
<description>&lt;p&gt;I just made Whizz, an esoteric programming language that is full of capability and possible experimentation. Before I interest you in that, I'll explain to you something.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;What &lt;em&gt;is&lt;/em&gt; an esoteric programming language?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;An esoteric language (or an esolang, colloquially), is a programming language designed to &lt;strong&gt;not&lt;/strong&gt; fit the coding 'norms' or conventions.&lt;/p&gt;
&lt;p&gt;Take an example: BF ('BF' is an abbreviation and euphemism of brainf***).&lt;/p&gt;
&lt;p&gt;A standard language would notate a 'Hello, World!' program as something like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;print(&quot;Hello, World!&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;BF, on the other hand, requires something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-brainfuck&quot;&gt;++++++++[&amp;gt;++++[&amp;gt;++&amp;gt;+++&amp;gt;+++&amp;gt;+&amp;lt;&amp;lt;&amp;lt;&amp;lt;-]&amp;gt;+&amp;gt;+&amp;gt;-&amp;gt;&amp;gt;+[&amp;lt;]&amp;lt;-]&amp;gt;&amp;gt;.&amp;gt;---.+++++++..+++.&amp;gt;&amp;gt;.&amp;lt;-.&amp;lt;.+++.------.--------.&amp;gt;&amp;gt;+.&amp;gt;++.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you can see, BF, like most esolangs, is different: it's hard to write and a puzzle.&lt;/p&gt;
&lt;p&gt;Whizz is inspired by BF, as its incrementing, decrementing and looping are inspired by it.&lt;/p&gt;
&lt;p&gt;I made Whizz because I thought languages like BF were &lt;em&gt;way&lt;/em&gt; too monotonous to write. Esolangs should be hard and puzzling to write, but not laborious. &lt;/p&gt;
&lt;p&gt;BF requires you type '+' as many times you want to increment (without loops): so you have to find shortcuts and unscalable solutions, just to achieve your goal. In Whizz, just type that incrementation repetition count &lt;em&gt;before&lt;/em&gt; the '+' sign, and there you have it!&lt;/p&gt;
&lt;p&gt;These wonderful features that Whizz boasts keep the challenge in esolang-ing, but contradictorily makes it more 'scalable'. Another notable feature is functions: the epitome of order.&lt;/p&gt;
&lt;p&gt;An example of a Whizz program would be:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;zeroToNine {
   [ create variables ]
   counter 10+ [ track state ]
   char 48+ [ print this one ]
   space 32+ [ space char ]
 
   (
     char!+ [ print and increment char ]
     counter-; [ decrement counter and end if zero ]
     space! [ print space ]
   )
}

zeroToNine*
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This, self explanatorily, outputs '0 1 2 3 4 5 6 7 8 9'. Again, in minimized form: &lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;c10+n48+s32+(n!+c-;s!)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I genuinely hope you experiment with Whizz, and solve puzzles &amp;amp; challenges with it, as if it were BF!&lt;/p&gt;
&lt;p&gt;Install it with the ease of a terminal command:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;pip install whizz
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you have MacOS, use pip3.&lt;/p&gt;
&lt;p&gt;Then, learn the usage &amp;amp; syntax &lt;a rel=&quot;nofollow&quot; href=&quot;https://codeberg.org/splot-dev/whizz#readme&quot;&gt;instructions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please share your thoughts, and constructive feedback is absolutely encouraged.&lt;/p&gt;
&lt;p&gt;Learn more about Whizz at the &lt;a rel=&quot;nofollow&quot; href=&quot;https://splot.dev/whizz/&quot;&gt;main site&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Bye!&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/23827/whizz-your-esoteric-language-thats-short-as-bf-but-easier-to-write</guid>
<pubDate>Thu, 30 Jul 2026 21:29:04 +0000</pubDate>
</item>
<item>
<title>Why Language Schools Should Prioritize Cybersecurity: A Passwordless Approach</title>
<link>https://coderlegion.com/15282/why-language-schools-should-prioritize-cybersecurity-a-passwordless-approach</link>
<description>
&lt;p&gt;As language schools use more digital tools, they face bigger risks from cyberattacks. Hackers often target schools because of the valuable personal data they hold. Traditional passwords are not strong enough to protect this information and can be easily hacked. A better solution is passwordless authentication.&lt;/p&gt;
&lt;p&gt;In this article, we will explore why language schools should prioritize cybersecurity and how adopting passwordless authentication can protect sensitive information while improving user experience.&lt;/p&gt;
&lt;h2&gt;The Rising Threats to Language School Security&lt;/h2&gt;
&lt;p&gt;Language schools face a variety of cybersecurity risks, including data breaches, phishing attacks, and the theft of sensitive student information. Hackers target educational platforms because they hold valuable personal data, such as student records, payment details, and communication histories.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately, many schools have weak security systems that make them easy targets. For example, a &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.cybersecuritydive.com/news/2020-k12-cybersecurity/597666/&quot;&gt;&lt;u&gt;2020 report&lt;/u&gt;&lt;/a&gt; found that educational institutions were among the top sectors targeted by cyberattacks, with over 1,200 cybersecurity incidents reported in the U.S. alone.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;These attacks not only threaten student privacy but also damage the reputation and trust that language schools have built. With the rise in cyberattacks, it&amp;rsquo;s crucial for schools to strengthen their security measures before it&amp;rsquo;s too late.&lt;/p&gt;
&lt;h2&gt;Why Passwords Aren&amp;rsquo;t Enough for Language Schools&lt;/h2&gt;
&lt;p&gt;For years, passwords have been the standard way to secure online accounts, but they are no longer enough to protect against modern cyber threats. Hackers can &lt;a rel=&quot;nofollow&quot; href=&quot;https://mojoauth.com/blog/password-attacks&quot;&gt;&lt;u&gt;easily guess or steal passwords&lt;/u&gt;&lt;/a&gt; through techniques like phishing or brute force attacks, leading to data breaches and identity theft. This makes relying on passwords a risky choice for language schools. Common challenges with traditional password systems include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Password fatigue:&lt;/strong&gt; Users often forget complex passwords, leading them to reuse simple ones across different accounts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Weak password practices:&lt;/strong&gt; Many individuals choose easily guessable passwords, like &amp;ldquo;123456&amp;rdquo; or &amp;ldquo;password,&amp;rdquo; which are highly vulnerable to attack.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security loopholes:&lt;/strong&gt; When passwords are reused or not updated regularly, they create gaps in security that hackers can exploit.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;What Is Passwordless Authentication and How Does It Work?&lt;/h2&gt;
&lt;p&gt;Passwordless authentication is a secure login method that eliminates the need for traditional passwords. Instead, users authenticate through alternative methods, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Magic links:&lt;/strong&gt; A one-time link sent to the user&amp;rsquo;s email to grant access.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;One-time passwords (OTPs):&lt;/strong&gt; Temporary codes sent via email, SMS, or apps like WhatsApp.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Biometrics:&lt;/strong&gt; Authentication through fingerprints, facial recognition, or other physical identifiers.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key benefits of passwordless systems include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved security:&lt;/strong&gt; Without passwords, there's less risk of phishing or password theft.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reduced login friction:&lt;/strong&gt; Users don't have to remember or type passwords, making access faster and easier.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better user experience:&lt;/strong&gt; A more secure login process leads to higher user satisfaction.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Modern EdTech platforms, especially those offering multilingual learning, must balance ease of access with strong security. Whether you're building a custom LMS or integrating with &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.teachngo.com/solutions/language-school-management-software&quot;&gt;&lt;u&gt;easy to use language teacher software&lt;/u&gt;&lt;/a&gt;, implementing passwordless authentication ensures students and instructors can log in securely without friction.&lt;/p&gt;
&lt;h2&gt;Endnote&lt;/h2&gt;
&lt;p&gt;Language schools must prioritize cybersecurity to protect sensitive data. Traditional passwords are no longer enough, leaving schools vulnerable to attacks. Adopting passwordless authentication enhances security, reduces login friction, and improves the user experience. By integrating solutions like MojoAuth, language schools can safeguard their platforms and ensure a safer and efficient learning environment.&lt;/p&gt;

</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/15282/why-language-schools-should-prioritize-cybersecurity-a-passwordless-approach</guid>
<pubDate>Mon, 27 Apr 2026 09:12:54 +0000</pubDate>
</item>
<item>
<title>English is The Worst Programming Language</title>
<link>https://coderlegion.com/15853/english-is-the-worst-programming-language</link>
<description>&lt;p&gt;In the world of software engineering, we obsess over programming languages: their syntax, their type systems, their performance characteristics, their paradigms. We debate Rust versus Go, Python's readability versus C++'s control, Haskell's purity versus JavaScript's chaos. Yet we rarely acknowledge the elephant in the room — or rather, the language we all use every day that makes every other language look like a model of crystalline precision: &lt;strong&gt;English&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;English is, without question, the worst programming language ever created. It is not merely flawed; it is fundamentally unsuited for the reliable transmission of complex ideas. Anyone who has ever tried to communicate a non-trivial technical concept to another human being knows this instinctively. The ambiguities, the contextual dependencies, the endless opportunities for misinterpretation — English excels at all of them.&lt;/p&gt;
&lt;p&gt;If you have spent any time in meetings, code reviews, specification documents, or even casual Slack threads, you have felt the pain. And if you have any background in mathematics, physics, or formal logic, the contrast becomes almost comically stark.&lt;/p&gt;
&lt;h4 id=&quot;precision-the-foundation-of-reliable-computation-and-communication-&quot;&gt;Precision: The Foundation of Reliable Computation (and Communication)&lt;/h4&gt;
&lt;p&gt;At its core, a good programming language is a formal system designed for &lt;em&gt;unambiguous&lt;/em&gt; execution. Every valid program has exactly one meaning under the language's semantics. A compiler or interpreter will produce the same behavior every time, assuming the same inputs and environment. This is not an accident; it is the entire point.&lt;/p&gt;
&lt;p&gt;Mathematics and physics adopted formal languages for the same reason. When Newton or Leibniz developed calculus, they didn't just wave their hands and say &quot;the rate of change, you know, kinda like speed but for curves.&quot; They created notation — symbols, rules of manipulation, axioms — that allowed precise statements like:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/09vg4fmhxnhwq3ko9fnv.png&quot; alt=&quot;Derivative Example&quot;&gt;&lt;/p&gt;
&lt;p&gt;This expression has one, and only one, interpretation among those who understand the formal system. There is no room for &quot;well, depending on what you mean by &lt;em&gt;derivative&lt;/em&gt;&quot; or &quot;in my experience, sometimes it's 2x plus or minus a bit.&quot;&lt;/p&gt;
&lt;p&gt;Physics follows suit. Maxwell's equations in differential form are not poetic suggestions:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ije9ywlr9drmgbsihpsq.png&quot; alt=&quot;Maxwell Equation&quot;&gt;&lt;/p&gt;
&lt;p&gt;These are not open to &quot;opinions-based&quot; interpretation. Misunderstand a sign or a vector component, and your electromagnetic device will quite literally fail to function. Engineers and physicists spend years learning to think within these formalisms precisely because natural language is too sloppy for the phenomena they describe.&lt;/p&gt;
&lt;p&gt;Formal languages exist because human natural languages are &lt;em&gt;terrible&lt;/em&gt; at edge cases, scope, and unintended interpretations. We invented predicate logic, set theory, lambda calculus, and programming languages to escape the swamp of ambiguity.&lt;/p&gt;
&lt;p&gt;English, by contrast, is the swamp.&lt;/p&gt;
&lt;h4 id=&quot;the-many-ways-english-fails-as-a-specification-language&quot;&gt;The Many Ways English Fails as a Specification Language&lt;/h4&gt;
&lt;p&gt;Consider something as seemingly simple as a requirement: &quot;The system shall process transactions quickly.&quot;&lt;/p&gt;
&lt;p&gt;What does &quot;quickly&quot; mean? Under 100ms? Under 500ms? Does it depend on load? On hardware? On network conditions? Is this a hard guarantee or a soft target? English offers no mechanism to distinguish these.&lt;/p&gt;
&lt;p&gt;Now imagine trying to implement a sorting algorithm based on an English description:&lt;/p&gt;
&lt;p&gt;&quot;Sort the list in ascending order, but put the most important items first, unless they're duplicates, in which case keep the original order for those.&quot;&lt;/p&gt;
&lt;p&gt;Good luck. Is &quot;important&quot; defined? What constitutes a duplicate? Does &quot;original order&quot; refer to stable sort semantics? English leaves all of this to intuition, shared context, and — inevitably — arguments in code review.&lt;/p&gt;
&lt;p&gt;Real-world examples abound in software projects:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Handle errors gracefully&quot; — Does this mean log them? Retry? Notify the user? Crash the process? Return a default value?&lt;/li&gt;
&lt;li&gt;&quot;Make the UI intuitive&quot; — Intuitive to whom? A power user? A complete novice? Someone from a different cultural background?&lt;/li&gt;
&lt;li&gt;&quot;The cache should be consistent&quot; — Eventual consistency? Strong consistency? What about partition tolerance?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are not edge cases. They are the norm. Experienced engineers learn to translate vague English requirements into precise specifications, often using formal tools (user stories with acceptance criteria, UML, TLA+, property-based testing) precisely because English alone is insufficient.&lt;/p&gt;
&lt;h4 id=&quot;ambiguity-at-every-level&quot;&gt;Ambiguity at Every Level&lt;/h4&gt;
&lt;p&gt;English is ambiguous at the lexical, syntactic, semantic, and pragmatic levels.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lexical ambiguity&lt;/strong&gt; (multiple meanings for the same word): &quot;Bank&quot; can mean a financial institution, the side of a river, or to rely on something. Context usually helps, but in technical documents, context can itself be contested.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Syntactic ambiguity&lt;/strong&gt; (parsing issues): Classic example — &quot;I saw the man with the telescope.&quot; Did I use the telescope to see the man, or did the man have the telescope? Programming languages avoid this with strict grammar rules and operator precedence.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Semantic ambiguity&lt;/strong&gt;: &quot;The function should return the largest value.&quot; Largest by what metric? In what ordering? For floating-point numbers, what about NaN or signed zeros?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pragmatic ambiguity&lt;/strong&gt;: What is left unsaid. In a conversation between colleagues who have worked together for years, massive amounts of information are implied. New team members, or an AI trying to implement from a spec, have no access to that shared mental model.&lt;/p&gt;
&lt;p&gt;Compare this to Python, often praised for readability:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def process_data(data: List[float]) -&amp;gt; Optional[float]:
    if not data:
        return None
    return max(data)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Even without types, the behavior is unambiguous to anyone who knows Python's semantics. &lt;code&gt;max([])&lt;/code&gt; raises an exception, but here we explicitly handle the empty case. The return type hint further constrains expectations.&lt;/p&gt;
&lt;p&gt;English has no equivalent of type hints, no compiler to catch inconsistencies, no unit tests for prose.&lt;/p&gt;
&lt;h4 id=&quot;why-we-put-up-with-it-and-why-we-shouldn-t-&quot;&gt;Why We Put Up With It (And Why We Shouldn't)&lt;/h4&gt;
&lt;p&gt;English has undeniable strengths. It is expressive, flexible, and culturally rich. It can convey emotion, nuance, humor, and poetry in ways that formal languages cannot. Shakespeare didn't write in lambda calculus for a reason.&lt;/p&gt;
&lt;p&gt;But when the goal is &lt;em&gt;reliable transmission of executable ideas&lt;/em&gt; — specifications, APIs, requirements, designs — those strengths become liabilities. Flexibility is another word for underspecification.&lt;/p&gt;
&lt;p&gt;Anyone with real experience communicating complex ideas knows the pattern:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Write what seems like a clear English description.&lt;/li&gt;
&lt;li&gt;Send it to a colleague.&lt;/li&gt;
&lt;li&gt;Receive back an implementation that is technically correct but completely misses the intent.&lt;/li&gt;
&lt;li&gt;Spend hours in discussion clarifying what was &quot;obviously&quot; meant.&lt;/li&gt;
&lt;li&gt;Repeat.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This is why mature software organizations invest heavily in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Precise requirements documents with measurable acceptance criteria&lt;/li&gt;
&lt;li&gt;Formal methods (where the cost justifies it — e.g., aerospace, finance, medical devices)&lt;/li&gt;
&lt;li&gt;Contract testing, property-based testing, and exhaustive specification&lt;/li&gt;
&lt;li&gt;Code as the single source of truth, with comments used sparingly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The very existence of these practices is an admission that English is inadequate.&lt;/p&gt;
&lt;p&gt;In physics and mathematics, we don't tolerate &quot;it's approximately true, in the usual sense.&quot; We define terms rigorously. We prove theorems. We build models whose predictions can be falsified experimentally. The precision of the language enables the precision of thought and the reliability of results.&lt;/p&gt;
&lt;p&gt;Programming aspires to the same rigor. That's why we have static type systems, formal verification tools like Coq or Lean, and languages with strong guarantees (memory safety, data-race freedom, etc.).&lt;/p&gt;
&lt;p&gt;English remains the worst because it resists all such discipline. It evolves organically, embraces exceptions, and thrives on interpretation. It is a living, messy, human thing — wonderful for literature, conversation, and persuasion; disastrous for programming.&lt;/p&gt;
&lt;h4 id=&quot;a-humble-remark&quot;&gt;A Humble Remark&lt;/h4&gt;
&lt;p&gt;We don't need to abandon English. We need to recognize its limitations and use better tools where precision matters.&lt;/p&gt;
&lt;p&gt;Next time you write a technical specification, ask yourself: Could this be misinterpreted in a way that leads to incorrect behavior? If the answer is yes (and it almost always is), add precision — through examples, edge cases, invariants, or even pseudocode.&lt;/p&gt;
&lt;p&gt;Treat English as a high-level, lossy compilation target rather than the final executable specification.&lt;/p&gt;
&lt;p&gt;Because in the end, the computer doesn't care about your opinions, your intent, or what &quot;everyone knows&quot; you meant. It executes precisely what you told it — in a real programming language.&lt;/p&gt;
&lt;p&gt;And humans, despite our intelligence, are not much better than computers when the specification is written in the worst programming language of all: English. &lt;/p&gt;
&lt;p&gt;We just hide our bugs better, and argue about them longer.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/15853/english-is-the-worst-programming-language</guid>
<pubDate>Sun, 26 Apr 2026 03:52:16 +0000</pubDate>
</item>
<item>
<title>Coderive v0.6.0 - Powered Up Language</title>
<link>https://coderlegion.com/10257/coderive-v0-6-0-powered-up-language</link>
<description>&lt;p&gt;How we transformed a prototype parser into enterprise-grade infrastructure with immutable state management&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Coderive v0.6.0, codenamed &quot;Powered Up,&quot; marks our transition from experimental language to professional-grade compiler infrastructure. This release fundamentally rearchitects the parsing system, introducing concepts that will support Coderive's growth for years to come.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Core Problem: Parser Spaghetti&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Our previous parser suffered from what we called &quot;parser spaghetti&quot; - tangled state management, inconsistent token consumption, and error-prone backtracking. The MainParser class had grown to over 2,000 lines, mixing program detection, statement parsing, and error handling in ways that made enhancements difficult.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Solution: Immutable Parser State&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Innovation: ParserContext &amp;amp; ParserState&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We introduced two core classes that changed everything:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;// Immutable state representation
public final class ParserState {
    private final List&amp;lt;Token&amp;gt; tokens;
    private final int position;
    private final int line;
    private final int column;
    // All operations return NEW instances
    public ParserState advance() { ... }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Why Immutability Matters:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;· Predictable backtracking with zero side effects&lt;br&gt;
· Thread-safe parsing for future parallel compilation&lt;br&gt;
· Clean separation between parsing logic and state management&lt;br&gt;
· Debuggability: every parsing step leaves a clear trail&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Expectation Pattern Revolution&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Gone are the days of &quot;forgot to consume&quot; bugs. We standardized on an expect() pattern:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;// OLD: Fragile manual checking
if (currentToken().type == KEYWORD &amp;amp;&amp;amp; currentToken().text.equals(&quot;if&quot;)) {
    consume();
    // ... parse condition ...
}

// NEW: Consistent expectation-based parsing
Token ifToken = expect(IF);
ExprNode condition = expressionParser.parseExpression();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This pattern eliminates entire categories of parsing bugs and makes the code dramatically more readable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Professional Package Structure&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We've organized the parser into logical packages:&lt;/p&gt;
&lt;p&gt;· cod.parser.context - Core state management&lt;br&gt;
· cod.parser.program - Program type detection&lt;br&gt;
· Dedicated StatementParser, ExpressionParser, and DeclarationParser&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Performance Wins&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Despite adding abstraction layers, parsing is now 30% faster due to:&lt;/p&gt;
&lt;p&gt;· Eliminated redundant token validations&lt;br&gt;
· Optimized lookahead with state caching&lt;br&gt;
· Predictable memory access patterns&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Real-World Impact&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For users, this means:&lt;/p&gt;
&lt;p&gt;· More accurate error messages with precise line/column positions&lt;br&gt;
· Faster compilation of large codebases&lt;br&gt;
· Reliable incremental parsing (coming in v0.7.0)&lt;br&gt;
· Better IDE support with our upcoming Language Server Protocol&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Code Sample: Before vs After&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Before (v0.5.0):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;public StmtNode parseIfStatement() {
    if (currentToken == null) return null;
    if (!currentToken.text.equals(&quot;if&quot;)) return null;
    consume();
    // ... 100 lines of mixed state management and parsing ...
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After (v0.6.0):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;public StmtNode parseIfStatement() {
    Token ifToken = expect(IF);
    ExprNode condition = expressionParser.parseExpression();
    StmtIfNode ifNode = ASTFactory.createIfStatement(condition, ifToken);
    // ... clean, focused parsing logic ...
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;The Bigger Picture&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This parser refactoring isn't just about cleaner code. It's about enabling:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Syntax highlighting in VS Code/IntelliJ&lt;/li&gt;
&lt;li&gt;Real-time error checking as you type&lt;/li&gt;
&lt;li&gt;Refactoring tools (rename, extract method, etc.)&lt;/li&gt;
&lt;li&gt;Multi-file analysis across your entire project&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Call to Action&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Try it now:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git clone https://github.com/DanexCodr/Coderive
cd Coderive
# Check out the new parser architecture
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We're building Coderive not just as another language, but as a professional-grade toolchain. This release lays the foundation for everything to come.&lt;/p&gt;
&lt;p&gt;Repo link: &lt;a rel=&quot;nofollow&quot; href=&quot;http://github.com/DanexCodr/Coderive&quot;&gt;Click here&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/10257/coderive-v0-6-0-powered-up-language</guid>
<pubDate>Thu, 22 Jan 2026 07:51:04 +0000</pubDate>
</item>
<item>
<title>Backtick - A Concise Programming Language</title>
<link>https://coderlegion.com/9107/backtick-a-concise-programming-language</link>
<description>&lt;p&gt;Hi there! I made Backtick - it's a very concise programming language written in Python.&lt;/p&gt;
&lt;p&gt;I made it because I wanted to make a programming language that you can use, but is very unique. Also, I wanted to be able to use it in future projects.&lt;/p&gt;
&lt;p&gt;To install Backtick, run this in your terminal:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pip install backtick
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It's got a simple syntax:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;command\arg\arg\arg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It has three data types:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; # strings
&amp;lt; # numbers
\ # variables
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;An example would be:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;+\v&amp;gt;Hello, &amp;gt;World!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This would set the variable &quot;v&quot; to &quot;Hello, &quot; and &quot;World!&quot; put together.&lt;/p&gt;
&lt;p&gt;You can find all the commands and other details &lt;a rel=&quot;nofollow&quot; href=&quot;https://codeberg.org/splot-dev/backtick-lang/src/branch/main/docs/guide.md&quot;&gt;here&lt;/a&gt;, and you can find the main page &lt;a rel=&quot;nofollow&quot; href=&quot;https://codeberg.org/splot-dev/backtick-lang&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/9107/backtick-a-concise-programming-language</guid>
<pubDate>Tue, 30 Dec 2025 22:29:47 +0000</pubDate>
</item>
<item>
<title>Actual Run of Coderive Language for Lazy Array and Loop</title>
<link>https://coderlegion.com/8941/actual-run-of-coderive-language-for-lazy-array-and-loop</link>
<description>&lt;p&gt;&lt;strong&gt;Real Run of Coderive&lt;/strong&gt;&lt;br&gt;
&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=5543237344532003458&quot; alt=&quot;Real run of Coderive&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Real Code of Coderive&lt;/strong&gt;&lt;br&gt;
&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=5404039322878692049&quot; alt=&quot;Real code of Coderive&quot;&gt;&lt;/p&gt;
</description>
<category>Java</category>
<guid isPermaLink="true">https://coderlegion.com/8941/actual-run-of-coderive-language-for-lazy-array-and-loop</guid>
<pubDate>Fri, 26 Dec 2025 11:56:28 +0000</pubDate>
</item>
<item>
<title>Coderive Language - 50ms for 1 Quintillion Elements in a Loop</title>
<link>https://coderlegion.com/8705/coderive-language-50ms-for-1-quintillion-elements-in-a-loop</link>
<description>&lt;p&gt;Author: Danison Nuñez&lt;br&gt;
Project: Coderive&lt;br&gt;
Project Type: Programming Language&lt;br&gt;
Highlight: Formula-based Execution&lt;/p&gt;
&lt;h3 id=&quot;coderive---iterating-through-1-quintillion-in-a-loop&quot;&gt;Coderive - Iterating Through 1 Quintillion in a Loop&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Subtitle: How a phone interpreter achieves what supercomputers cannot&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The Impossible Loop:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;// In any other language, this would be computational suicide
for i in [0 to 1Qi] {  // 1,000,000,000,000,000,000 iterations
    arr[i] = i * i
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Traditional Reality:&lt;/p&gt;
&lt;p&gt;· Python: MemoryError at array creation&lt;br&gt;
· Java/C++: Theoretical 31 years (with 8 exabytes of RAM)&lt;br&gt;
· NumPy/TensorFlow: Immediate crash&lt;br&gt;
· GPU Computing: 80GB VRAM limit exceeded&lt;/p&gt;
&lt;p&gt;Coderive's Reality: 50 milliseconds.&lt;/p&gt;
&lt;p&gt;The Magic Behind It:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;NaturalArray: Virtual arrays that store formulas, not data&lt;/li&gt;
&lt;li&gt;Runtime Pattern Detection: Transforms loops to mathematical expressions&lt;/li&gt;
&lt;li&gt;Lazy Evaluation: Computes only what's accessed&lt;/li&gt;
&lt;li&gt;Formula Storage: LoopFormula, ConditionalFormula, MultiBranchFormula&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Technical Deep Dive:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;// What you write:
for i in [0 to 1Qi] {
    if i % 2 == 0 {
        arr[i] = i * i
    } elif i % 3 == 0 {
        arr[i] = i * i * i
    } else {
        arr[i] = i
    }
}

// What Coderive creates internally:
arr.addMultiBranchFormula(
    conditions: [i%2==0, i%3==0],
    expressions: [i*i, i*i*i],
    elseExpr: i,
    range: [0, 1Qi]
)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The Optimization Pipeline:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;User Code → Pattern Detection → Formula Creation → Lazy Evaluation
     ↓           ↓                ↓                  ↓
   O(n)        O(1)             O(1)              O(1) per access
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Complete Pattern Coverage:&lt;/p&gt;
&lt;p&gt;· ✅ Simple Transformations: arr[i] = f(i) → LoopFormula&lt;br&gt;
· ✅ Binary Decisions: if-else → ConditionalFormula&lt;br&gt;
· ✅ Multi-way Branches: if-elif-else → MultiBranchFormula&lt;br&gt;
· ✅ Partial Updates: if-only with implicit else preservation&lt;/p&gt;
&lt;p&gt;Real-World Impact:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;// Process every pixel in 8K video (≈33 million frames)
for frame in [0 to 33M] {
    for pixel in [0 to 7680*4320] {  // 33 million frames × 33 million pixels
        if brightness &amp;gt; 128 {
            pixels[pixel] = 255
        } elif brightness &amp;gt; 64 {
            pixels[pixel] = 128
        } else {
            pixels[pixel] = 0
        }
    }
}
// Traditional: Impossible
// Coderive: Seconds, not centuries
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The Secret Sauce:&lt;/p&gt;
&lt;p&gt;· No data movement (arrays stay virtual)&lt;br&gt;
· No parallel programming (formulas are inherently parallel)&lt;br&gt;
· No memory management (O(1) memory complexity)&lt;br&gt;
· No specialized hardware (runs on Java 7)&lt;/p&gt;
&lt;p&gt;Conclusion: Coderive doesn't just make loops faster—it redefines what's computationally possible on commodity hardware.&lt;/p&gt;
&lt;p&gt;Check Coderive now at:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[http://github.com/DanexCodr/Coderive][1]
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Java</category>
<guid isPermaLink="true">https://coderlegion.com/8705/coderive-language-50ms-for-1-quintillion-elements-in-a-loop</guid>
<pubDate>Mon, 22 Dec 2025 03:54:21 +0000</pubDate>
</item>
<item>
<title>Coderive - A New Programming Language of 2025</title>
<link>https://coderlegion.com/8683/coderive-a-new-programming-language-of-2025</link>
<description>&lt;p&gt;Author: DanexCodr&lt;br&gt;
Project: Coderive&lt;br&gt;
Project Type: Programming Language&lt;/p&gt;
&lt;h3 id=&quot;while-ai-takes-the-spotlight-coderive-solves-computational-impossibility&quot;&gt;While AI takes the spotlight, Coderive solves computational impossibility&lt;/h3&gt;
&lt;p&gt;In a landscape dominated by AI integrations and web frameworks,Coderive emerges as a fundamentally different kind of programming language for 2025. Instead of chasing the latest AI trend, Coderive addresses a more profound problem: breaking computational complexity barriers that have limited programmers for decades.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Core Innovation:&lt;/strong&gt;&lt;br&gt;
Coderive introduces&quot;Formula-Based Computing&quot; - a runtime optimization system that transforms traditional O(n) operations into O(1) mathematical formulas. Where other languages iterate, Coderive calculates.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Syntax That Speaks for Itself:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;// Traditional languages would crash or take millennia
arr := [0 to 1Qi]  // 1 quintillion elements - virtual, not allocated

// This runs in 50ms, not 31 years
for i in [0 to 1Qi] {
    if i % 2 == 0 {
        arr[i] = i * i          // &quot;even&quot; squares
    } elif i % 3 == 0 {
        arr[i] = i * i * i      // &quot;multiple of 3&quot; cubes  
    } else {
        arr[i] = i              // everything else
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Why 2025 Needs Coderive:&lt;/strong&gt;&lt;br&gt;
· Big Data Without Big Infrastructure: Process trillion-row datasets on phone hardware&lt;br&gt;
· Mathematical Clarity: any[] and all[] replace confusing &amp;amp;&amp;amp;/|| operators&lt;br&gt;
· Runtime Intelligence: Pattern detection happens as code executes, no pre-compilation needed&lt;br&gt;
· Three World System: Scripts, Methods, and Modules for different abstraction levels&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Quantifier-First Design Philosophy:&lt;/strong&gt;&lt;br&gt;
Abandoning traditional boolean operators,Coderive embraces a more expressive syntax:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;// Crystal clear intent vs traditional &amp;amp;&amp;amp;/|| confusion
if all[scores &amp;gt;= 60, !isFailed, attempts &amp;lt; 3] { proceed() }
if any[isReady, hasBackup, forceMode] { execute() }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Performance That Defies Convention:&lt;/strong&gt;&lt;br&gt;
Operation Coderive Python/Java/C++&lt;br&gt;
Process 1 quintillion elements 50ms Never completes&lt;br&gt;
Memory for 1 quintillion array O(1) 8EB (impossible)&lt;br&gt;
Conditional classification O(1) O(n)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Available Now:&lt;/strong&gt;&lt;br&gt;
Coderive v0.4.0 runs on Android/Java 7+, proving that revolutionary computation doesn't require cutting-edge hardware. It's a language for the algorithmic future, available today.&lt;/p&gt;
&lt;p&gt;Check it out now at: &lt;a rel=&quot;nofollow&quot; href=&quot;https://%20github.com/DanexCodr/Coderive&quot;&gt;https:// github.com/DanexCodr/Coderive&lt;/a&gt;&lt;/p&gt;
</description>
<category>Java</category>
<guid isPermaLink="true">https://coderlegion.com/8683/coderive-a-new-programming-language-of-2025</guid>
<pubDate>Sun, 21 Dec 2025 05:02:05 +0000</pubDate>
</item>
<item>
<title>Coderive v0.3.0: The Design Leap - A Realized Vision</title>
<link>https://coderlegion.com/8477/coderive-v0-3-0-the-design-leap-a-realized-vision</link>
<description>&lt;p&gt;Author: DanexCodr&lt;br&gt;
Date: December 15, 2025&lt;br&gt;
Repository: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/DanexCodr/Coderive&quot;&gt;https://github.com/DanexCodr/Coderive&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;the-three-world-system-scripting-functional-and-oop-in-harmony&quot;&gt;The Three-World System: Scripting, Functional, and OOP in Harmony&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;A Language for Every Task&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Coderive v0.3.0 introduces a revolutionary approach: three distinct program types that share a common syntax but optimize for different development paradigms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;World 1: Scripts - Direct and Immediate&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Scripts are the simplest form of Coderive programs—perfect for automation, quick calculations, and learning:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-kotlin&quot;&gt;// Simple script - executes top-down
output &quot;=== Temperature Converter ===&quot;
fahrenheit: float = (float) input &quot;Enter °F: &quot;
celsius: float = (fahrenheit - 32) * 5 / 9
output fahrenheit + &quot;°F = &quot; + celsius + &quot;°C&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Characteristics:&lt;/p&gt;
&lt;p&gt;· No classes or methods required&lt;br&gt;
· Direct statement execution&lt;br&gt;
· Perfect for one-off tasks&lt;br&gt;
· Implicit &lt;strong&gt;Script&lt;/strong&gt; type wrapper&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;World 2: Method Scripts - Functional Focus&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Method Scripts bridge scripting and modular programming, focusing on reusable functions:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-kotlin&quot;&gt;// Method script - only functions, no classes
local calculateBMI(weight: float, height: float) :: bmi: float {
    bmi = weight / (height * height) ::
}

local categorizeBMI(bmi: float) :: category: text {
    if bmi &amp;lt; 18.5 {
        category = &quot;Underweight&quot; ::
    } else if bmi &amp;lt; 25 {
        category = &quot;Normal&quot; ::
    } else if bmi &amp;lt; 30 {
        category = &quot;Overweight&quot; ::
    } else {
        category = &quot;Obese&quot; ::
    }
}

share main() {
    output &quot;BMI Calculator&quot;
    weight := (float) input &quot;Weight (kg): &quot;
    height := (float) input &quot;Height (m): &quot;
    
    bmi := calculateBMI(weight, height)
    category := categorizeBMI(bmi)
    
    output &quot;BMI: &quot; + bmi + &quot; (&quot; + category + &quot;)&quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Characteristics:&lt;/p&gt;
&lt;p&gt;· Only functions allowed&lt;br&gt;
· main() method as entry point&lt;br&gt;
· Encourages pure functions&lt;br&gt;
· Implicit &lt;strong&gt;MethodScript&lt;/strong&gt; container&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;World 3: Modules - Full Object-Oriented Programming&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Modules represent Coderive's most powerful form, supporting classes, inheritance, and complex systems:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-kotlin&quot;&gt;unit BankingSystem

use {
    lang.Sys,
    math.Finance
}

share BankAccount {
    // Fields
    owner: text
    balance: float
    accountNumber: int
    
    // Constructor
    share this(ownerName: text, initialDeposit: float) {
        owner = ownerName
        balance = initialDeposit
        accountNumber = generateAccountNumber()
    }
    
    // Methods
    local deposit(amount: float) :: newBalance: float {
        balance = balance + amount
        ~&amp;gt; newBalance: balance
    }
    
    local withdraw(amount: float) :: success: bool, newBalance: float {
        if amount &amp;lt;= balance {
            balance = balance - amount
            ~&amp;gt; success: true, newBalance: balance
        } else {
            ~&amp;gt; success: false, newBalance: balance
        }
    }
    
    // Private helper
    private generateAccountNumber() :: number: int {
        // Implementation details...
    }
}

    share main() {
    account := BankAccount(&quot;Alice&quot;, 1000.0)
         result := account.withdraw(500)
    
         if result.success {
            output &quot;Withdrawal successful. New balance: &quot; + result.newBalance
     }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Characteristics:&lt;/p&gt;
&lt;p&gt;· Full class support with PascalCase naming&lt;br&gt;
· Constructors with this keyword&lt;br&gt;
· Public and private methods&lt;br&gt;
· Multiple return values via slots&lt;br&gt;
· Explicit unit declarations&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Interpreter's Role&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The Coderive interpreter intelligently handles all three world types:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;// In Interpreter.java
private void runModule(ProgramNode program) {
    // Find and execute main() in a class
    // Full OOP support
}

private void runScript(ProgramNode program) {
    // Execute statements directly
    // No method/class overhead
}

private void runMethodScript(ProgramNode program) {
    // Find main() method in synthetic type
    // Function-focused execution
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Design Philosophy&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The Three-World System addresses fundamental programming needs:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Beginner-Friendly: Scripts lower the barrier to entry&lt;/li&gt;
&lt;li&gt;Functional Elegance: Method Scripts encourage clean, testable code&lt;/li&gt;
&lt;li&gt;Enterprise-Ready: Modules support large-scale development&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Practical Benefits&lt;/p&gt;
&lt;p&gt;For Education:&lt;/p&gt;
&lt;p&gt;· Students start with scripts, progress to functions, then learn OOP&lt;br&gt;
· Gradual complexity increase matches learning curves&lt;/p&gt;
&lt;p&gt;For Development:&lt;/p&gt;
&lt;p&gt;· Quick prototypes as scripts&lt;br&gt;
· Utility libraries as method scripts&lt;br&gt;
· Production systems as modules&lt;/p&gt;
&lt;p&gt;For Maintenance:&lt;/p&gt;
&lt;p&gt;· Clear boundaries between different abstraction levels&lt;br&gt;
· Easy migration between paradigms as needs change&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Vision Realized&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This tri-modal approach represents a bold vision: one language that adapts to the programmer's needs, rather than forcing the programmer to adapt to the language. It acknowledges that different tasks require different tools, and provides all three in a cohesive, consistent syntax.&lt;/p&gt;
</description>
<category>Java</category>
<guid isPermaLink="true">https://coderlegion.com/8477/coderive-v0-3-0-the-design-leap-a-realized-vision</guid>
<pubDate>Mon, 15 Dec 2025 06:54:32 +0000</pubDate>
</item>
<item>
<title>Coderive - A mobile-first programming language created entirely on a phone</title>
<link>https://coderlegion.com/7336/coderive-a-mobile-first-programming-language-created-entirely-on-a-phone</link>
<description>&lt;p&gt;Coderive - A Mobile-First Programming Language Created Entirely on a Phone&lt;/p&gt;
&lt;p&gt;In the world of compiler development and programming language design, we often imagine teams of engineers working in high-tech offices with powerful workstations. But what if I told you that a fully-featured programming language with a sophisticated compiler pipeline was built entirely on a mobile phone? Meet Coderive - a groundbreaking project that challenges our assumptions about where and how serious software development can happen.&lt;/p&gt;
&lt;p&gt;The Vision Behind Coderive&lt;/p&gt;
&lt;p&gt;Coderive represents a bold vision: &quot;To have the very first Filipino-made mobile-first production-ready self-hosting programming language.&quot; This isn't just another programming language - it's a statement about accessibility, innovation, and breaking down barriers in software development.&lt;/p&gt;
&lt;p&gt;Development Against All Odds&lt;/p&gt;
&lt;p&gt;The developer, DanexCodr, created Coderive using only a smartphone and a carefully curated set of mobile development tools:&lt;/p&gt;
&lt;p&gt;· Java NIDE - A fast Java 7 compiler for Android&lt;br&gt;
· Quickedit - For code editing&lt;br&gt;
· Termux - Providing a Linux environment&lt;br&gt;
· AI Assistants - DeepSeek and Gemini for debugging and problem-solving&lt;/p&gt;
&lt;p&gt;This constrained environment forced creative solutions and optimized the entire development process for mobile-first workflows.&lt;/p&gt;
&lt;p&gt;Technical Architecture: Sophisticated Under the Hood&lt;/p&gt;
&lt;p&gt;Despite its mobile origins, Coderive boasts a surprisingly sophisticated technical architecture:&lt;/p&gt;
&lt;p&gt;Dual-Parser System&lt;/p&gt;
&lt;p&gt;Coderive features not one, but two independent parsing systems:&lt;/p&gt;
&lt;p&gt;· ANTLR-based parser for robust, grammar-driven parsing&lt;br&gt;
· Manual recursive backtracking parser for flexibility and mobile optimization&lt;/p&gt;
&lt;p&gt;This dual approach ensures parsing reliability while maintaining performance on mobile devices.&lt;/p&gt;
&lt;p&gt;Advanced Compilation Pipeline&lt;/p&gt;
&lt;p&gt;The compilation system demonstrates remarkable technical depth:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;// From CompilationEngine.java
public void compileFullPipeline(ProgramNode ast, String outputFilename, boolean disassemble) {
    BytecodeProgram bytecode = compileToBytecode(ast, disassemble);
    compileToNative(bytecode, outputFilename);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The pipeline compiles through multiple stages: source → AST → bytecode → native assembly, supporting both interpretation and native compilation.&lt;/p&gt;
&lt;p&gt;Innovative Register Allocation&lt;/p&gt;
&lt;p&gt;One of Coderive's most impressive features is its &quot;future-cost predictive register spilling&quot; system. The register allocator doesn't just use simple LRU - it predicts which registers will be needed soon and makes intelligent spilling decisions:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;// From RegisterSpiller.java - Advanced spill heuristic
private int estimateNextUseDistance(String register, int currentPc, List&amp;lt;BytecodeInstruction&amp;gt; bytecode) {
    // Complex lookahead analysis to predict register usage patterns
    // This goes far beyond typical academic register allocators
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Language Features That Shine&lt;/p&gt;
&lt;p&gt;Coderive isn't just technically impressive - it introduces several innovative language features:&lt;/p&gt;
&lt;p&gt;Multi-Return Slots&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;share interactiveDemo {
    ~| formula, operation  // Declare return slots
    local calculate(int a, int b, string op) {
        if op == &quot;+&quot; {
            ~ formula a + b      // Return multiple values
            ~ operation &quot;addition&quot;
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Expressive Smart For-Loops&lt;/p&gt;
&lt;p&gt;The language supports complex loop patterns that would be verbose in other languages:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;// Various supported step patterns
for i by 2 in 1 to 10          // Simple step
for i by *2 in 1 to 100        // Multiplicative step  
for i by i-=5 in 100 to 1       // Compound assignment step
for i by *+2 in 1 to 1000      // Combined operator step
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Clean, Modern Syntax&lt;/p&gt;
&lt;p&gt;Coderive reduces boilerplate while maintaining readability:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;unit sample.program get {
    cod.Math  // Clean import system
}

share main() {
    output &quot;Welcome to Coderive!&quot;
    // Implicit class and method structure
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The Compilation Output: Professional Grade&lt;/p&gt;
&lt;p&gt;Despite being built on a phone, Coderive generates professional-quality assembly code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-assembly&quot;&gt;    .text
    .global calculate
calculate:
    stp x29, x30, [sp, #-16]!
    mov x29, sp
    sub sp, sp, #64
    // Advanced register allocation in action
    stp x19, x20, [x29, #-16]
    stp x21, x22, [x29, #-32]
    // ... sophisticated ARM64 assembly
    mov x0, x21  // Return value
    ret
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Why Coderive Matters&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Democratizing Compiler Development&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Coderive proves that you don't need expensive hardware or institutional backing to create sophisticated programming tools. A smartphone and determination are enough.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Filipino-Led Innovation&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In a field dominated by Western institutions and large tech companies, Coderive represents important representation and demonstrates that innovation can come from anywhere.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Mobile-First Mindset&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;While others treat mobile as a secondary platform, Coderive embraces it as primary, leading to optimizations and approaches that desktop-focused tools might miss.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;AI-Paired Development Methodology&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The project showcases how AI assistants can accelerate complex development tasks, potentially changing how individual developers approach large projects.&lt;/p&gt;
&lt;p&gt;Current Status and Future&lt;/p&gt;
&lt;p&gt;Coderive is already remarkably functional:&lt;/p&gt;
&lt;p&gt;· ✅ Full interpreter with complete language features&lt;br&gt;
· ✅ Native code generation for ARM64 and x86_64&lt;br&gt;
· ✅ Advanced register allocation with spill optimization&lt;br&gt;
· ✅ Complex control flow and loop patterns&lt;br&gt;
·  Ongoing improvements to string handling and type system&lt;/p&gt;
&lt;p&gt;The project welcomes community involvement and discussion through GitHub Discussions.&lt;/p&gt;
&lt;p&gt;Conclusion: Redefining Possible&lt;/p&gt;
&lt;p&gt;Coderive stands as a testament to what's possible when passion meets persistence. It challenges our assumptions about:&lt;/p&gt;
&lt;p&gt;· Where serious development can happen (anywhere with a phone)&lt;br&gt;
· Who can create programming languages (anyone with vision)&lt;br&gt;
· How we approach tool development (mobile-first from day one)&lt;/p&gt;
&lt;p&gt;In the words of the project's motto: &quot;Built with passion and persistence on and for mobile devices — proving that innovation knows no hardware boundaries.&quot;&lt;/p&gt;
&lt;p&gt;Coderive isn't just another programming language; it's a demonstration that the future of software development might be more mobile, more accessible, and more diverse than we ever imagined.&lt;/p&gt;
&lt;p&gt;Happy coding to derive your visions! &lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Explore Coderive: &lt;a rel=&quot;nofollow&quot; href=&quot;http://github.com/DanexCodr/Coderive&quot;&gt;(GitHub Repository)&lt;/a&gt;&lt;/p&gt;
</description>
<category>Java</category>
<guid isPermaLink="true">https://coderlegion.com/7336/coderive-a-mobile-first-programming-language-created-entirely-on-a-phone</guid>
<pubDate>Fri, 14 Nov 2025 03:15:57 +0000</pubDate>
</item>
<item>
<title>DevLog 20250711: __init__.py</title>
<link>https://coderlegion.com/3905/devlog-20250711-init-py</link>
<description>&lt;p&gt;Revision: 01&lt;br&gt;
Last Update: 2025-07-11&lt;/p&gt;
&lt;h3 id=&quot;python-init-py&quot;&gt;Python: &lt;code&gt;__init__.py&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;In Python, any folder with an &lt;code&gt;__init__.py&lt;/code&gt; file is treated as a package. Beyond merely signaling &quot;this is a package,&quot; the body of &lt;code&gt;__init__.py&lt;/code&gt; is executed &lt;strong&gt;once&lt;/strong&gt; on the first import of that package:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;# mypkg/__init__.py
print(&quot;Initializing mypkg…&quot;)

from .submodule import foo
foo()
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Package marker&lt;/strong&gt;: without it, legacy Python (pre-3.3) wouldn't recognize the folder as importable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Init code&lt;/strong&gt;: import-time logic, re-exports (via &lt;code&gt;__all__&lt;/code&gt;), lazy-loading, package-level constants, or registration hooks.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;javascript-node-js-index-js-or-main-entry-&quot;&gt;JavaScript / Node.js: &lt;code&gt;index.js&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt; entry)&lt;/h3&gt;
&lt;p&gt;A folder containing an &lt;code&gt;index.js&lt;/code&gt; becomes the &quot;default&quot; module when you &lt;code&gt;require('./dir')&lt;/code&gt; or &lt;code&gt;import … from './dir'&lt;/code&gt;. Any top-level code in &lt;code&gt;index.js&lt;/code&gt; runs on first load:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// mylib/index.js
console.log('Bootstrapping mylib…');
module.exports = {
  foo: require('./foo')
};
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Entrypoint marker&lt;/strong&gt;: Node looks for &lt;code&gt;index.js&lt;/code&gt; (or whatever &lt;code&gt;&quot;main&quot;&lt;/code&gt; says in &lt;code&gt;package.json&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Init code&lt;/strong&gt;: startup logic, polyfills, shared configuration, or wiring of sub-modules.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;go-func-init-&quot;&gt;Go: &lt;code&gt;func init()&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Every Go file may define one or more &lt;code&gt;init()&lt;/code&gt; functions. They run &lt;strong&gt;once per package&lt;/strong&gt;, before &lt;code&gt;main()&lt;/code&gt; or any other package-scope references:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-go&quot;&gt;// pkg/foo/foo.go
package foo

import &quot;fmt&quot;

func init() {
    fmt.Println(&quot;Initializing package foo&quot;)
}

func Foo() { /* … */ }
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Package discovery&lt;/strong&gt;: any folder under &lt;code&gt;$GOPATH&lt;/code&gt; (or a module) is a package if it contains Go files all declaring the same &lt;code&gt;package name&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Init hooks&lt;/strong&gt;: multiple &lt;code&gt;init()&lt;/code&gt; funcs across files get sequenced by the compiler; use sparingly for registration or side-effects.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;java-jvm-languages-static-initializers&quot;&gt;Java / JVM languages: static initializers&lt;/h3&gt;
&lt;p&gt;Java packages are a purely &lt;strong&gt;naming&lt;/strong&gt; convention - no file marks a folder as a package. To run code when classes load, you use static initializers in classes:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;package com.example.mylib;

public class Bootstrap {
    static {
        System.out.println(&quot;Loading com.example.mylib&quot;);
        Config.registerAll();
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Package marker&lt;/strong&gt;: the &lt;code&gt;package&lt;/code&gt; declaration in each &lt;code&gt;.java&lt;/code&gt; file plus folder layout.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Init code&lt;/strong&gt;: any class with a static block (or a static field initializer) will execute when that class is first loaded by the JVM. You can force it by referencing the class in your app's entry point.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;c-net-static-constructors&quot;&gt;C# / .NET: static constructors&lt;/h3&gt;
&lt;p&gt;Like Java, namespaces in C# are declared in each file - folders are only &lt;strong&gt;convention&lt;/strong&gt;. To perform per‐assembly or per‐class initialization:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;namespace MyCompany.MyLibrary
{
    public static class Bootstrap
    {
        static Bootstrap()
        {
            Console.WriteLine(&quot;MyLibrary initializing&quot;);
            Registry.Setup();
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Namespace marker&lt;/strong&gt;: the &lt;code&gt;namespace&lt;/code&gt; keyword in code; folder structure optional.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Init code&lt;/strong&gt;: static constructors (&lt;code&gt;static ClassName()&lt;/code&gt;) run once before any member of that type is accessed. For assembly-level hooks, you can place &lt;code&gt;[ModuleInitializer]&lt;/code&gt; in .NET 5+.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;ruby-gems-library-root-file&quot;&gt;Ruby (Gems): library root file&lt;/h3&gt;
&lt;p&gt;Ruby gems almost always have a single &quot;root&quot; file under &lt;code&gt;lib/&lt;/code&gt; named after the gem:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;# lib/mygem.rb
puts &quot;Initializing MyGem&quot;
require_relative &quot;mygem/version&quot;
require_relative &quot;mygem/core&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Package marker&lt;/strong&gt;: the gemspec tells RubyGems that &lt;code&gt;lib/mygem.rb&lt;/code&gt; is the entrypoint.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Init code&lt;/strong&gt;: top-level code in that file runs on the first &lt;code&gt;require 'mygem'&lt;/code&gt;, used to set up autoloads, mixins, or configuration defaults.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;php-composer-bootstrap-files&quot;&gt;PHP (Composer): bootstrap files&lt;/h3&gt;
&lt;p&gt;PHP's PSR-4 autoloader maps namespaces to directories, but you often supply a manual bootstrap:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;lt;?php
// src/bootstrap.php
echo &quot;Bootstrapping App…\n&quot;;
spl_autoload_register(…);
define('APP_STARTED', true);
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Package marker&lt;/strong&gt;: &lt;code&gt;composer.json&lt;/code&gt;'s &lt;code&gt;&quot;autoload&quot;&lt;/code&gt; section.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Init code&lt;/strong&gt;: any PHP file you include - often named &lt;code&gt;bootstrap.php&lt;/code&gt; or &lt;code&gt;init.php&lt;/code&gt; - and run before handling a request or CLI command.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;summary-of-init-code-patterns&quot;&gt;Summary of Init-Code Patterns&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Language    &lt;/th&gt;&lt;th&gt;Package Marker           &lt;/th&gt;&lt;th&gt;Init Hook Mechanism&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Python&lt;/strong&gt;  &lt;/td&gt;&lt;td&gt;&lt;code&gt;__init__.py&lt;/code&gt;            &lt;/td&gt;&lt;td&gt;Top-level code in &lt;code&gt;__init__.py&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Node.js&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;&lt;code&gt;index.js&lt;/code&gt; / &lt;code&gt;&quot;main&quot;&lt;/code&gt;    &lt;/td&gt;&lt;td&gt;Top-level code in entry file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Go&lt;/strong&gt;      &lt;/td&gt;&lt;td&gt;any folder of Go files   &lt;/td&gt;&lt;td&gt;&lt;code&gt;func init()&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Java&lt;/strong&gt;    &lt;/td&gt;&lt;td&gt;&lt;code&gt;package …&lt;/code&gt; + folders    &lt;/td&gt;&lt;td&gt;&lt;code&gt;static { … }&lt;/code&gt; blocks&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;C#/.NET&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;&lt;code&gt;namespace …&lt;/code&gt;            &lt;/td&gt;&lt;td&gt;&lt;code&gt;static ClassName()&lt;/code&gt; constructor or &lt;code&gt;[ModuleInitializer]&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Ruby&lt;/strong&gt;    &lt;/td&gt;&lt;td&gt;gemspec → &lt;code&gt;lib/gem.rb&lt;/code&gt;   &lt;/td&gt;&lt;td&gt;Top-level code in gem root file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;PHP&lt;/strong&gt;     &lt;/td&gt;&lt;td&gt;&lt;code&gt;composer.json&lt;/code&gt; autoload &lt;/td&gt;&lt;td&gt;Included bootstrap file&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;In practice, most ecosystems decouple &quot;marking&quot; a module from &quot;running init code,&quot; using either:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;A special filename&lt;/strong&gt; (like Python's &lt;code&gt;__init__.py&lt;/code&gt; or Node's &lt;code&gt;index.js&lt;/code&gt;), or&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Language hooks&lt;/strong&gt; (Go's &lt;code&gt;init()&lt;/code&gt; or JVM/C# static initializers), or&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Build-time metadata&lt;/strong&gt; (Composer's JSON, Ruby's gemspec) combined with an explicit bootstrap include.&lt;/li&gt;
&lt;/ol&gt;
</description>
<category>Python</category>
<guid isPermaLink="true">https://coderlegion.com/3905/devlog-20250711-init-py</guid>
<pubDate>Fri, 11 Jul 2025 12:55:54 +0000</pubDate>
</item>
<item>
<title>DevLog 20250711: Limitations of Scratch</title>
<link>https://coderlegion.com/3903/devlog-20250711-limitations-of-scratch</link>
<description>&lt;p&gt;Revision: 1&lt;br&gt;
Last update: 2025-07-11&lt;br&gt;
Tags: Reference&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Scratch is top 20 most used programming language in &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.tiobe.com/tiobe-index/scratch/&quot;&gt;TIOBE index&lt;/a&gt;. Understanding limitations of other programming systems is key to improving our own programming language (Divooka).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Scratch targets a different audience than we do, however, it's very well-designed, highly accessible and well adopted. Due to its visual paradigm similarity, we use it as a point of comparison for Divooka in terms of fidelity.&lt;/p&gt;
&lt;p&gt;Scratch is designed for learning and small‐scale animations or games. It does this job really well.&lt;/p&gt;
&lt;h3 id=&quot;advantages&quot;&gt;Advantages&lt;/h3&gt;
&lt;p&gt;Here are some of the major advantages of using Scratch as a first programming environment:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Intuitive, Low-Barrier Visual Interface&lt;/strong&gt;&lt;br&gt;
Scratch's drag-and-drop block system eliminates syntax errors and lets learners focus on concepts rather than typing rules. Its colorful, tactile blocks and immediate feedback make it fun and engaging from the very first project.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fosters Creativity and Engagement&lt;/strong&gt;&lt;br&gt;
With Scratch, users can build interactive stories, animations, games, music and art - mixing sprites, sound and backgrounds to realize their ideas. This &quot;Imagine-Program-Share&quot; cycle encourages open-ended exploration and artistic expression.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Promotes Computational Thinking &amp;amp; Problem-Solving&lt;/strong&gt;&lt;br&gt;
By snapping together blocks for loops, conditionals, variables and events, students naturally learn decomposition, algorithmic thinking and debugging strategies. Scratch even introduces parallelism - each sprite runs its own scripts - so beginners see concurrency concepts early on.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Vibrant, Collaborative Online Community&lt;/strong&gt;&lt;br&gt;
The Scratch website hosts millions of &quot;Scratchers&quot; who share, remix and comment on projects. Community-run studios and design challenges foster collaboration, peer feedback and iterative learning - building social-emotional as well as coding skills.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Highly Accessible &amp;amp; Inclusive&lt;/strong&gt;&lt;br&gt;
Scratch is completely free and runs in any modern web browser (or as an offline desktop app). It's translated into over 50 languages and its block-based format lowers barriers for learners with dyslexia, limited typing skills or other challenges.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Educationally Aligned &amp;amp; Cross-Disciplinary&lt;/strong&gt;&lt;br&gt;
Used in thousands of schools worldwide (from elementary through college), Scratch supports math, science, history and language arts lessons through interactive simulations and tutorials. Educators leverage it to visualize abstract concepts and design project-based assessments.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Strong Foundation for Future Coding&lt;/strong&gt;&lt;br&gt;
Concepts mastered in Scratch - sequencing, events, data structures - translate directly to text-based languages like Python and Java. Many curricula use Scratch as a stepping-stone to more advanced computer science topics and career pathways.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Builds Confidence &amp;amp; Persistence&lt;/strong&gt;&lt;br&gt;
The instant, visual nature of Scratch's feedback loop - see your sprite move as soon as you snap a block - encourages learners to experiment, iterate and persist through challenges, laying the groundwork for resilient problem-solving habits.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;limitations&quot;&gt;Limitations&lt;/h3&gt;
&lt;p&gt;It runs into trouble once you're trying to build &quot;real&quot; software. Below we enumerate some major pain points, and some ideas for how to overcome each.&lt;/p&gt;
&lt;h4 id=&quot;1-monolithic-flat-project-structure&quot;&gt;1. Monolithic, Flat Project Structure&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What happens in Scratch:&lt;/strong&gt;&lt;br&gt;
All your code lives in sprites and the Stage, with no real namespace or folder hierarchies. It's like having every chapter of your novel printed on Post-its stuck to one wall.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why it's a problem at scale:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;Hard to organize hundreds of scripts&lt;/li&gt;
&lt;li&gt;Difficult to see &quot;what calls what&quot;&lt;/li&gt;
&lt;li&gt;Prone to name collisions when you start copying-and-pasting blocks&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How to address it:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Custom block libraries&lt;/strong&gt;: Treat each custom block as a mini-module, and group them carefully by sprite (e.g. &quot;Physics,&quot; &quot;UI,&quot; &quot;Data&quot;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Transpile to text code&lt;/strong&gt;: Export your project to JavaScript or Python (via tools like TurboWarp or external transpilers) so you can organize into real files and folders.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Adopt a hybrid editor&lt;/strong&gt;: Use tools like MakeCode or Blockly that let you switch between blocks and text, and support hierarchical file structures.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-no-real-version-control&quot;&gt;2. No Real Version Control&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What happens in Scratch:&lt;/strong&gt;&lt;br&gt;
You &quot;Save&quot; or &quot;Remix,&quot; and history is opaque. There's no Git diff you can read or &quot;branch&quot; your experiments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why it's a problem at scale:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;Team collaboration stalls&lt;/li&gt;
&lt;li&gt;Risk of overwriting each other's work&lt;/li&gt;
&lt;li&gt;Hard to roll back a specific change (e.g. &quot;Why did the scoring logic break on June 10?&quot;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How to address it:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Structured exports&lt;/strong&gt;: Regularly export your project as SB3 and check those binary files into a Git repo with clear commit messages.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Text-based backups&lt;/strong&gt;: Leverage a transpiler to convert Scratch blocks into JavaScript or Python, then use Git on the resulting code.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use a visual-code platform with Git support&lt;/strong&gt;: Divooka or alternatives (e.g. Node-RED, Blockly) that let you commit changes as text under the hood.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;3-limited-language-features&quot;&gt;3. Limited Language Features&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What happens in Scratch:&lt;/strong&gt;&lt;br&gt;
You get basic loops, conditionals and variables, but no classes, no modules, no first-class functions, no generics.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why it's a problem at scale:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;You can't encapsulate complex behavior neatly&lt;/li&gt;
&lt;li&gt;Difficult to share sophisticated libraries (e.g. a math library or HTTP client)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How to address it:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Extension mechanism&lt;/strong&gt;: Build or use native extensions (ScratchX or TurboWarp extensions) to expose advanced APIs (file I/O, networking, data structures).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hybrid blocks + text&lt;/strong&gt;: Offer a &quot;power user&quot; mode where blocks desugar into real functions and classes in a host language.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Migrate critical components&lt;/strong&gt;: For performance- or feature-critical parts (e.g. physics engine), write them in C# or Python and call them via an FFI-style bridge.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-performance-amp-resource-constraints&quot;&gt;4. Performance &amp;amp; Resource Constraints&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What happens in Scratch:&lt;/strong&gt;&lt;br&gt;
All scripts run in a single-threaded VM with modest optimization; large loops or many clones can slow everything to a crawl.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why it's a problem at scale:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;Complex simulations or data processing become unbearably slow&lt;/li&gt;
&lt;li&gt;No easy way to leverage multiple CPU cores or GPU&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How to address it:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Chunk and yield&lt;/strong&gt;: Break big tasks into small chunks and let the scheduler breathe (e.g. use &lt;code&gt;wait 0 secs&lt;/code&gt; strategically).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Native compute modules&lt;/strong&gt;: Offload heavy work into native extensions written in C/C++/Rust.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Parallelizable architecture&lt;/strong&gt;: Move to a platform (like Divooka) that supports true multithreading or asynchronous tasks.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;5-debugging-amp-testing&quot;&gt;5. Debugging &amp;amp; Testing&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What happens in Scratch:&lt;/strong&gt;&lt;br&gt;
You're limited to watching sprites move, sprinkling in &lt;code&gt;say&lt;/code&gt; blocks or using the &quot;block watcher.&quot; There's no unit-test framework or breakpoint debugger.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why it's a problem at scale:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;Bugs hide in tangled event chains&lt;/li&gt;
&lt;li&gt;Hard to write repeatable regression tests&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How to address it:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Logging extension&lt;/strong&gt;: Create blocks that log to an external console or file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test harness in code&lt;/strong&gt;: Transpile critical logic into plain code and write unit tests (e.g. using pytest or NUnit).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Visual breakpoint system&lt;/strong&gt;: Enhance your tool (or use TurboWarp) to allow pausing and inspecting variables at runtime.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;6-collaboration-amp-team-workflow&quot;&gt;6. Collaboration &amp;amp; Team Workflow&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What happens in Scratch:&lt;/strong&gt;&lt;br&gt;
Mostly a single-user hobby environment with &quot;Remix&quot; as the only share option.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why it's a problem at scale:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;No real task assignment or issue tracking&lt;/li&gt;
&lt;li&gt;Unstructured remixing leads to forks with no merge path&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How to address it:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Integrated project management&lt;/strong&gt;: Embed issue-tracking metadata in your SBC file or alongside exports.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Merge tooling&lt;/strong&gt;: Use text-based diffs (after transpilation) and Git-based PR workflows.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Role-based access&lt;/strong&gt;: Adopt an environment where you can assign &quot;developer,&quot; &quot;reviewer,&quot; &quot;tester&quot; roles, with locking on code units.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;bottom-line&quot;&gt;Bottom Line&lt;/h4&gt;
&lt;p&gt;Scratch is an incredible gateway for learning programming fundamentals and building quick prototypes. But when you're talking hundreds of sprites, gigabytes of assets, dozens of collaborators, or millions of lines of logic… you need:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Modularity &amp;amp; namespaces&lt;/strong&gt; (think packages)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Text-based exports for version control&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Advanced language features &amp;amp; extensions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance optimizations via native code&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Real debugging &amp;amp; testing frameworks&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Team collaboration workflows&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Many of these gaps can be addressed by extended platforms like &lt;strong&gt;Snap!&lt;/strong&gt;, &lt;strong&gt;Blockly/MakeCode&lt;/strong&gt; and &lt;strong&gt;TurboWarp&lt;/strong&gt;.&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/3903/devlog-20250711-limitations-of-scratch</guid>
<pubDate>Fri, 11 Jul 2025 12:55:09 +0000</pubDate>
</item>
<item>
<title>Topic 20250618: Procedural Context is More Learning (and Syntax) to Users</title>
<link>https://coderlegion.com/3363/topic-20250618-procedural-context-is-more-learning-and-syntax-to-users</link>
<description>&lt;h3 id=&quot;overview&quot;&gt;Overview&lt;/h3&gt;
&lt;p&gt;When people first open Divooka, they see a network of interconnected nodes where connections represent data flow.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/09w4h4ekh092007lcieh.png&quot; alt=&quot;Hello World in Divooka&quot;&gt;&lt;/p&gt;
&lt;p&gt;Even someone who has never seen visual programming or Divooka before can read the titles of the nodes and input parameters and have a pretty good guess at what the program does.&lt;/p&gt;
&lt;p&gt;Thus, a key to using Divooka (in the dataflow context) efficiently is understanding the execution runtime - what nodes are active, what the dependency tree is, and how caching works.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qff3yneo64t71mme33a0.png&quot; alt=&quot;Canonical Example of Divooka Program&quot;&gt;&lt;/p&gt;
&lt;p&gt;As someone who has been using Unreal Engine Blueprint since 2014, the concept of &quot;execution flow&quot; appears natural to me - but when showing this to new users, it became evident that it takes time to tune in and learn to read the diagrams.&lt;/p&gt;
&lt;p&gt;We'll take a look at what procedural context is, then briefly analyze why that's the case.&lt;/p&gt;
&lt;h3 id=&quot;the-procedural-constructs&quot;&gt;The Procedural Constructs&lt;/h3&gt;
&lt;p&gt;The procedural context in Divooka provides many constructs that may be familiar to those from traditional programming languages.&lt;/p&gt;
&lt;p&gt;An example is shown below:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xcspn3im5zkka4w0qcco.png&quot; alt=&quot;Procedural Example&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;common-constructs&quot;&gt;Common Constructs&lt;/h4&gt;
&lt;p&gt;Conditional logic is done using the &lt;strong&gt;Branch&lt;/strong&gt; node.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pbihzzew385ja3qhtiwd.png&quot; alt=&quot;Branch Node&quot;&gt;&lt;/p&gt;
&lt;p&gt;Loops are implemented using the &lt;strong&gt;Repeat&lt;/strong&gt; node.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/thv3amrjl4i1ufrupazg.png&quot; alt=&quot;Repeat Node&quot;&gt;&lt;/p&gt;
&lt;p&gt;Iteration is done using the &lt;strong&gt;For Each&lt;/strong&gt; node.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ql7n4ejel01nehp9dqum.png&quot; alt=&quot;For Each Node&quot;&gt;&lt;/p&gt;
&lt;p&gt;Functions are handled using the &lt;strong&gt;Execute Event&lt;/strong&gt; and &lt;strong&gt;Custom Event&lt;/strong&gt; nodes.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sc114ttylctvk2ud65mt.png&quot; alt=&quot;Custom Events&quot;&gt;&lt;/p&gt;
&lt;p&gt;A switch-case structure is implemented using the &lt;strong&gt;Switch&lt;/strong&gt; node.&lt;/p&gt;
&lt;p&gt;(Pending image)&lt;/p&gt;
&lt;h4 id=&quot;unique-constructs&quot;&gt;Unique Constructs&lt;/h4&gt;
&lt;p&gt;In addition, Divooka also offers constructs that are unique to it:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sequence&lt;/strong&gt; nodes are used to define multiple sequential steps.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zk5upgtqff6xbbatxrvu.png&quot; alt=&quot;Sequence Node&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Events&lt;/strong&gt; are entry points defined by the framework (procedural context base type).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z5xv5n64dbesogk75inv.png&quot; alt=&quot;Event Example&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;implementation-note&quot;&gt;Implementation Note&lt;/h4&gt;
&lt;p&gt;Certain constructs are currently missing:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Break&lt;/strong&gt;: to exit a loop prematurely.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;caveats-of-states&quot;&gt;Caveats of States&lt;/h4&gt;
&lt;p&gt;What's more, in procedural context there is the possibility of manipulating state - for example, incrementing a number to be used next time.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xhoq417eu65xdj97z511.png&quot; alt=&quot;State Variable Example&quot;&gt;&lt;/p&gt;
&lt;p&gt;Thus, to use the procedural context effectively, users need to learn a good amount of &quot;syntax&quot;: control flow, state handling, and more.&lt;/p&gt;
&lt;h3 id=&quot;the-two-contexts&quot;&gt;The Two Contexts&lt;/h3&gt;
&lt;p&gt;Given that all of the top 10 most popular programming languages support imperative/procedural programming as the default mode, one might expect this to be the most straightforward paradigm. In reality, that's not the case.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhjzx1by2t1sf2ertcj8.png&quot; alt=&quot;The Two Contexts&quot;&gt;&lt;/p&gt;
&lt;p&gt;Use the &lt;strong&gt;dataflow context&lt;/strong&gt; for data-centric operations, such as data transformations.&lt;/p&gt;
&lt;p&gt;Use the &lt;strong&gt;procedural context&lt;/strong&gt; for logic-centric operations, such as branching and conditional executions.&lt;/p&gt;
&lt;p&gt;Unlike procedural context, when using dataflow context, users need to learn only a single syntax: connections represent data flows, and everything (almost) always executes - depending on node activation status. To follow the flow of a program is simply to follow the connections - there's no concern about branches or alternate execution paths.&lt;/p&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;The procedural context is more complex for several reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Connections now represent both data and execution flow&lt;/li&gt;
&lt;li&gt;Some nodes can interrupt, diverge from, or selectively execute downstream connections - requiring users to understand exact behaviors to make accurate predictions&lt;/li&gt;
&lt;li&gt;There are many types of flow control nodes, each requiring learning&lt;/li&gt;
&lt;li&gt;State is involved&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Part of the reason Divooka started with the dataflow context was exactly to reduce this complexity. However, as programs become more complicated and procedural logic becomes involved, it's not possible to avoid procedural context - in fact, having it is often more convenient than not.&lt;/p&gt;
&lt;p&gt;Users must make informed decisions about what to put into procedural context and what to offload to dataflow context.&lt;/p&gt;
&lt;h3 id=&quot;references&quot;&gt;References&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://wiki.methodox.io/Divooka/Language/DataflowContext&quot;&gt;Dataflow context in Divooka&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://wiki.methodox.io/Divooka/Language/ProceduralContext&quot;&gt;Procedural context in Divooka&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>C#</category>
<guid isPermaLink="true">https://coderlegion.com/3363/topic-20250618-procedural-context-is-more-learning-and-syntax-to-users</guid>
<pubDate>Wed, 18 Jun 2025 17:44:27 +0000</pubDate>
</item>
</channel>
</rss>