<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ~K'</title>
    <description>The latest articles on DEV Community by ~K' (@lucaasd3v).</description>
    <link>https://dev.to/lucaasd3v</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3720016%2F32508d87-58be-49e1-bbda-b168a2461f06.jpeg</url>
      <title>DEV Community: ~K'</title>
      <link>https://dev.to/lucaasd3v</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lucaasd3v"/>
    <language>en</language>
    <item>
      <title>How do you feel seeing this diagnosis at 3:27 AM (compiler written in Zig)?</title>
      <dc:creator>~K'</dc:creator>
      <pubDate>Sun, 29 Mar 2026 11:49:18 +0000</pubDate>
      <link>https://dev.to/lucaasd3v/como-voce-se-sente-ao-ver-este-diagnostico-as-3h27-da-manha-compilador-escrito-em-zig-26lo</link>
      <guid>https://dev.to/lucaasd3v/como-voce-se-sente-ao-ver-este-diagnostico-as-3h27-da-manha-compilador-escrito-em-zig-26lo</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7cut7dgke8l31atbjp39.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7cut7dgke8l31atbjp39.png" alt=" " width="625" height="668"&gt;&lt;/a&gt;&lt;/p&gt;

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

</description>
    </item>
    <item>
      <title>I built a compiled language to replace Bash and Python for CLI tools (and skipped malloc entirely)</title>
      <dc:creator>~K'</dc:creator>
      <pubDate>Wed, 11 Mar 2026 13:16:37 +0000</pubDate>
      <link>https://dev.to/lucaasd3v/i-built-a-compiled-language-to-replace-bash-and-python-for-cli-tools-and-skipped-malloc-entirely-3g1f</link>
      <guid>https://dev.to/lucaasd3v/i-built-a-compiled-language-to-replace-bash-and-python-for-cli-tools-and-skipped-malloc-entirely-3g1f</guid>
      <description>&lt;p&gt;If you write infrastructure tooling, CI/CD scripts, or general CLI utilities, you are probably trapped in a miserable trilemma:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Bash is great until line 50. After that, it becomes a minefield of silent failures, whitespace explosions, and string-parsing nightmares.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Python and Node.js have great standard libraries, but bootstrapping an entire VM/Interpreter just to parse a JSON payload or spawn a process adds unacceptable latency to fast workflows.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go and Rust are incredibly powerful, but writing a quick 20-line script in them often requires massive boilerplate for basic I/O and process execution.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted the functional ergonomics of data pipelines, but I wanted it strictly typed, AOT-compiled, and dependency-free.&lt;/p&gt;

&lt;p&gt;So I built Flint.&lt;/p&gt;

&lt;p&gt;The Architecture: Zig to C99&lt;br&gt;
Flint is a transpiler written in Zig. &lt;br&gt;
It reads .fl scripts, generates highly optimized pure C99 code, and links it via Clang into a standalone native executable.&lt;/p&gt;

&lt;p&gt;But the real engineering decision was the runtime memory model.&lt;/p&gt;

&lt;p&gt;Skipping the Garbage Collector (and malloc)&lt;br&gt;
CLI tools have a very specific lifecycle: they boot, process data, and exit. Traditional Garbage Collection (GC) or manual malloc/free churn introduces unnecessary overhead for this specific use case.&lt;/p&gt;

&lt;p&gt;Instead, the Flint C runtime boots by requesting a massive 4GB virtual address space directly from the Linux kernel using mmap(MAP_NORESERVE | MAP_ANONYMOUS).&lt;/p&gt;

&lt;p&gt;Because no physical RAM is actually allocated at boot, this operation is practically instantaneous.&lt;/p&gt;

&lt;p&gt;From there, every memory allocation in Flint is just a branchless pointer bump (arena_offset += size). The OS lazily pages in physical RAM via page faults only when the memory is touched.&lt;br&gt;
When the script finishes, we don't bother freeing anything. The OS instantly reaps the entire memory mapping.&lt;/p&gt;

&lt;p&gt;Result: Zero memory fragmentation, zero GC pauses, and startup times in the sub-10ms range.&lt;/p&gt;

&lt;p&gt;The Syntax: Pipeline Operator&lt;br&gt;
To make data processing intuitive, Flint uses the pipeline operator (~&amp;gt;). Data flows forward, eliminating nested function hell.&lt;/p&gt;

&lt;p&gt;Under the hood, the compiler resolves a ~&amp;gt; b(c) into b(a, c) at compile time, meaning zero runtime overhead.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const username = env("USER");

# Execute a shell command and process the output natively
exec("ps aux")
    ~&amp;gt; lines()
    ~&amp;gt; grep(username)
    ~&amp;gt; join("\n")
    ~&amp;gt; write_file("user_procs.log");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;AOT Structs vs Dynamic JSON Parsing&lt;br&gt;
Parsing JSON dynamically in interpreted languages is slow due to hashmap lookups and reflection. Flint relies on Ahead-Of-Time (AOT) Struct Mapping.&lt;/p&gt;

&lt;p&gt;When you define a struct, the Emitter generates a specialized, static C function that maps JSON keys directly to physical memory offsets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct GithubUser {
    login: string,
    id: int,
    hireable: bool
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Native HTTP fetch with zero-cost inline error handling
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const payload = fetch("https://api.github.com/users/lucaas-d3v") catch |err| {
    print("Network failure intercepted.");
    exit(1);
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Zero-copy, AOT-compiled mapping from JSON to native C struct
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const user = parse_json_as(GithubUser, to_str(payload));

print(concat("Developer: ", user.login));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zero-Copy Strings&lt;/p&gt;

&lt;p&gt;Strings in Flint are "fat pointers" (a pointer to the data and a length size_t). Slicing a string, reading a file, or splitting text doesn't copy the underlying bytes. It merely creates a new slice pointing to the original memory arena, making text processing operations O(1) in memory.&lt;/p&gt;

&lt;p&gt;Try it out&lt;br&gt;
Flint is experimental but highly optimized for its core use cases. The compiler source code is open, and I'd love to hear feedback from other systems engineers, compiler nerds, and DevOps folks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Canonical Repository: &lt;a href="https://codeberg.org/lucaas-d3v/flint" rel="noopener noreferrer"&gt;https://codeberg.org/lucaas-d3v/flint&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub Mirror: &lt;a href="https://github.com/lucaas-d3v/flint" rel="noopener noreferrer"&gt;https://github.com/lucaas-d3v/flint&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>zig</category>
      <category>devops</category>
      <category>cli</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Zemit — minimal release tool for Zig projects</title>
      <dc:creator>~K'</dc:creator>
      <pubDate>Fri, 27 Feb 2026 22:49:09 +0000</pubDate>
      <link>https://dev.to/lucaasd3v/zemit-minimal-release-tool-for-zig-projects-1no</link>
      <guid>https://dev.to/lucaasd3v/zemit-minimal-release-tool-for-zig-projects-1no</guid>
      <description>&lt;p&gt;Repo: &lt;a href="https://codeberg.org/lucaas-d3v/zemit" rel="noopener noreferrer"&gt;https://codeberg.org/lucaas-d3v/zemit&lt;/a&gt; &lt;br&gt;
Docs: &lt;a href="https://codeberg.org/lucaas-d3v/zemit/src/branch/main/docs/" rel="noopener noreferrer"&gt;https://codeberg.org/lucaas-d3v/zemit/src/branch/main/docs/&lt;/a&gt;&lt;br&gt;
License: &lt;a href="https://codeberg.org/lucaas-d3v/zemit/src/branch/main/docs/LICENSE" rel="noopener noreferrer"&gt;https://codeberg.org/lucaas-d3v/zemit/src/branch/main/docs/LICENSE&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt;&lt;br&gt;
Zemit is a small, opinionated CLI to build and prepare multi-target releases for Zig projects.&lt;br&gt;
The focus is on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;deterministic, reproducible outputs&lt;/li&gt;
&lt;li&gt;human-friendly config (TOML subset)&lt;/li&gt;
&lt;li&gt;explicit error messages&lt;/li&gt;
&lt;li&gt;safe defaults (no partial publishes)&lt;/li&gt;
&lt;li&gt;simple artifact layout (by-target / flat) with checksums&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key features (v0.2.x)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;full config surface: &lt;code&gt;[build]&lt;/code&gt;, &lt;code&gt;[release]&lt;/code&gt;, &lt;code&gt;[dist]&lt;/code&gt; (dir, layout, name_template)&lt;/li&gt;
&lt;li&gt;checksums support (sha256 / sha512)&lt;/li&gt;
&lt;li&gt;strict template validation (unknown variables = error)&lt;/li&gt;
&lt;li&gt;deterministic CLI flow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Current status&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;v0.2.x: config parsing and validation are stable&lt;/li&gt;
&lt;li&gt;v0.2.5: polishing done — stronger validation, safer outputs, clearer logs&lt;/li&gt;
&lt;li&gt;v0.3.x (at the moment): porting Zemit from Zig 0.13.0 to 0.15.2&lt;/li&gt;
&lt;li&gt;v0.4.x (planned): provider APIs (GitHub, GitLab, Codeberg)&lt;/li&gt;
&lt;li&gt;v0.5.x (planned): optional parallel build mode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why it exists&lt;/strong&gt;&lt;br&gt;
A lot of projects ship messy release scripts.&lt;br&gt;
Zemit tries to replace that with a small, auditable tool that keeps things predictable and simple for maintainers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to try&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://codeberg.org/lucaas-d3v/zemit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Read the quickstart: &lt;a href="https://codeberg.org/lucaas-d3v/zemit/src/branch/main/docs/README.md#quick-start" rel="noopener noreferrer"&gt;https://codeberg.org/lucaas-d3v/zemit/src/branch/main/docs/README.md#quick-start&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Everything about the configuration file: &lt;a href="https://codeberg.org/lucaas-d3v/zemit/src/branch/main/docs/config.md" rel="noopener noreferrer"&gt;https://codeberg.org/lucaas-d3v/zemit/src/branch/main/docs/config.md&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Looking for&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;feedback on config ergonomics (TOML subset — does it feel intuitive?)&lt;/li&gt;
&lt;li&gt;CI integration ideas (GitHub Actions, GitLab CI)&lt;/li&gt;
&lt;li&gt;testers for Windows / Linux / macOS builds&lt;/li&gt;
&lt;li&gt;help implementing provider adapters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I can also post a short demo run output or share a small binary if that helps.&lt;/p&gt;

</description>
      <category>zig</category>
      <category>release</category>
      <category>code</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Ambiguity Scales Worse Than Verbosity</title>
      <dc:creator>~K'</dc:creator>
      <pubDate>Thu, 22 Jan 2026 19:04:26 +0000</pubDate>
      <link>https://dev.to/lucaasd3v/ambiguity-scales-worse-than-verbosity-35i4</link>
      <guid>https://dev.to/lucaasd3v/ambiguity-scales-worse-than-verbosity-35i4</guid>
      <description>&lt;p&gt;When designing small scripts or short-lived software, implicit behavior often feels productive.&lt;/p&gt;

&lt;p&gt;The language guesses your intent.&lt;br&gt;
Defaults kick in.&lt;br&gt;
Short syntax saves keystrokes.&lt;/p&gt;

&lt;p&gt;Everything looks fine.&lt;br&gt;
Until the system grows.&lt;/p&gt;




&lt;p&gt;The illusion of productivity&lt;/p&gt;

&lt;p&gt;Implicit behavior is often sold as convenience.&lt;br&gt;
And in small contexts, it is.&lt;/p&gt;

&lt;p&gt;But convenience scales poorly.&lt;/p&gt;

&lt;p&gt;As systems grow, implicit behavior becomes:&lt;/p&gt;

&lt;p&gt;silent assumptions&lt;/p&gt;

&lt;p&gt;hidden contracts&lt;/p&gt;

&lt;p&gt;multiple interpretations of the same construct&lt;/p&gt;

&lt;p&gt;At that point, what once felt productive starts turning into:&lt;/p&gt;

&lt;p&gt;bugs that are hard to reproduce&lt;/p&gt;

&lt;p&gt;behavior that depends on context instead of intent&lt;/p&gt;

&lt;p&gt;systems that are fragile by design&lt;/p&gt;

&lt;p&gt;The problem is not verbosity.&lt;br&gt;
The problem is ambiguity.&lt;/p&gt;




&lt;p&gt;Ambiguity is not a syntax issue&lt;/p&gt;

&lt;p&gt;Ambiguity is often treated as a stylistic choice.&lt;/p&gt;

&lt;p&gt;It’s not.&lt;/p&gt;

&lt;p&gt;It’s a design failure.&lt;/p&gt;

&lt;p&gt;When a language allows:&lt;/p&gt;

&lt;p&gt;implicit type conversions&lt;/p&gt;

&lt;p&gt;inferred intent without explicit declaration&lt;/p&gt;

&lt;p&gt;multiple meanings for the same construct&lt;/p&gt;

&lt;p&gt;behavior that changes silently across contexts&lt;/p&gt;

&lt;p&gt;It is no longer helping the developer —&lt;br&gt;
it is guessing.&lt;/p&gt;

&lt;p&gt;And guessing does not scale.&lt;/p&gt;




&lt;p&gt;Why verbosity is not the enemy&lt;/p&gt;

&lt;p&gt;Verbosity is visible.&lt;br&gt;
Ambiguity is invisible.&lt;/p&gt;

&lt;p&gt;You can refactor verbosity.&lt;br&gt;
You can’t refactor assumptions you don’t know exist.&lt;/p&gt;

&lt;p&gt;In long-lived systems, clarity is cheaper than cleverness.&lt;/p&gt;

&lt;p&gt;Explicit code:&lt;/p&gt;

&lt;p&gt;documents intent&lt;/p&gt;

&lt;p&gt;exposes boundaries&lt;/p&gt;

&lt;p&gt;survives team changes&lt;/p&gt;

&lt;p&gt;survives time&lt;/p&gt;




&lt;p&gt;Treating ambiguity as a design error&lt;/p&gt;

&lt;p&gt;This perspective led me to work on Klar, an experimental programming language that takes a hard stance:&lt;/p&gt;

&lt;p&gt;no implicit behavior&lt;/p&gt;

&lt;p&gt;no inferred intent&lt;/p&gt;

&lt;p&gt;no ambiguous constructs&lt;/p&gt;

&lt;p&gt;no hidden boundaries between languages or contexts&lt;/p&gt;

&lt;p&gt;If something matters, it must be stated explicitly.&lt;br&gt;
If behavior is important, it must be written.&lt;/p&gt;

&lt;p&gt;The language should not guess.&lt;/p&gt;




&lt;p&gt;This is not about being beginner-friendly&lt;/p&gt;

&lt;p&gt;Strictness is often confused with hostility.&lt;/p&gt;

&lt;p&gt;Klar does not try to be friendly at first glance.&lt;br&gt;
It optimizes for:&lt;/p&gt;

&lt;p&gt;clarity&lt;/p&gt;

&lt;p&gt;predictability&lt;/p&gt;

&lt;p&gt;long-term stability&lt;/p&gt;

&lt;p&gt;polyglot system boundaries&lt;/p&gt;

&lt;p&gt;Learning curves are temporary.&lt;br&gt;
Ambiguity debt is permanent.&lt;/p&gt;




&lt;p&gt;Final thought&lt;/p&gt;

&lt;p&gt;Implicit behavior feels fast — until it isn’t.&lt;br&gt;
Verbosity feels slow — until you need to understand a system years later.&lt;/p&gt;

&lt;p&gt;When designing languages or systems meant to live long,&lt;br&gt;
ambiguity is more dangerous than verbosity.&lt;/p&gt;




&lt;p&gt;If you’re curious, the project and its manifesto live 👉 &lt;a href="https://klarlang.github.io/website/docs/intro/manifest" rel="noopener noreferrer"&gt;here&lt;/a&gt; 👈&lt;/p&gt;

</description>
      <category>codequality</category>
      <category>design</category>
      <category>programming</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Designing Better Compiler Diagnostics — Lessons from building Klar</title>
      <dc:creator>~K'</dc:creator>
      <pubDate>Mon, 19 Jan 2026 16:51:32 +0000</pubDate>
      <link>https://dev.to/lucaasd3v/designing-better-compiler-diagnostics-lessons-from-building-klar-bhb</link>
      <guid>https://dev.to/lucaasd3v/designing-better-compiler-diagnostics-lessons-from-building-klar-bhb</guid>
      <description>&lt;p&gt;I’m building a small experimental language called Klar (formerly Klang) as a way to explore explicit semantics, strict diagnostics, and polyglot tooling. This is not a production-ready language — it’s a design exercise — but along the way I’ve been obsessing over one concrete problem: what makes a compiler error actually useful?&lt;/p&gt;

&lt;p&gt;Below is a real example of how Klar currently reports an unresolved symbol error (trimmed for brevity). I’d love feedback on whether this format is too verbose, just right, or missing something important.&lt;/p&gt;

&lt;p&gt;Example diagnostic (what the user sees):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[K:E217] UnresolvedSymbol
ERROR (SEMANTIC)
at undefinedVariableExceptionTest.kl:10:12

 8 |     }
 9 |
10 |     println(total);
   |             ^

Cause:
  The variable 'total' does not exist

Fix:
  Remove it or create it
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The source that produced it (Klar .kl):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Use("java")
public void main(){
    integer count = 10;
    integer iterator = 0;

    while (iterator &amp;lt; count){
        iterator = iterator + 1;
    }

    println(total);

    return null;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Design notes (short):&lt;/p&gt;

&lt;p&gt;Diagnostics are structured as data first (error code + metadata) and rendered as readable text.&lt;/p&gt;

&lt;p&gt;Short summary → precise location (file:line:col + caret) → human explanation → actionable fix.&lt;/p&gt;

&lt;p&gt;I aim to avoid playful/friendly language in favor of clarity and predictability.&lt;/p&gt;

&lt;p&gt;Suggestions should be conservative — “did you mean X?” only when the confidence is reasonable.&lt;/p&gt;

&lt;p&gt;Questions for the community&lt;/p&gt;

&lt;p&gt;When you evaluate a diagnostic, what matters most: precision, minimalism, or actionable fixes?&lt;/p&gt;

&lt;p&gt;Do you prefer a single-line summary first (then details) or a single readable paragraph?&lt;/p&gt;

&lt;p&gt;Are there diagnostic patterns you’ve seen that consistently confuse users?&lt;/p&gt;

&lt;p&gt;I’m specifically interested in how diagnostics trade off between noise and helpfulness. If you want to see more examples (type mismatches, missing returns, magic-number warnings), I’ll paste them in the comments.&lt;/p&gt;

&lt;p&gt;— ~K' (building Klar)&lt;/p&gt;

</description>
      <category>compiling</category>
      <category>opensource</category>
      <category>programming</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
