<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Daniel Donche Jr. on Medium]]></title>
        <description><![CDATA[Stories by Daniel Donche Jr. on Medium]]></description>
        <link>https://medium.com/@dandonche?source=rss-6cb0562f1653------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QEmnyfGkCHnsSpYayFssJQ.png</url>
            <title>Stories by Daniel Donche Jr. on Medium</title>
            <link>https://medium.com/@dandonche?source=rss-6cb0562f1653------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 05:42:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dandonche/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Making My Own Programming Language, Part 2: I Have Made a Terrible Mistake]]></title>
            <link>https://medium.com/@dandonche/making-my-own-programming-language-part-2-i-have-made-a-terrible-mistake-f7498797728c?source=rss-6cb0562f1653------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7498797728c</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Daniel Donche Jr.]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 05:43:57 GMT</pubDate>
            <atom:updated>2026-11-09T05:47:13.835Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*6_agW_UHlYIK_2ftI2gEVA.png" /><figcaption>This is my Goblin logo. Isn’t it neat?</figcaption></figure><p>A little over a year ago, I set out to make my own programming language. I outlined the reasons for this totally rational decision in the first blog post. <a href="https://medium.com/@dandonche/making-my-own-programming-language-fc56967c9f0b?sharedUserId=dandonche">https://medium.com/@dandonche/making-my-own-programming-language-fc56967c9f0b</a></p><h3>Humble Beginnings</h3><p>What had happened was, I started with a specification doc, which turned into a lexer, then a parser, then an interpreter. Then, once I had that, I decided to make documentation for <a href="https://goblinlang.org/">Goblin</a>. Because, as I understood it, all languages need documentation. I don’t know if you know this, but without instructions, nobody will be able to use such a thing.</p><p>I started with Docusaurus, then moved to Mkdocs, then I said: “No. Goblin should write its own documentation, like the champion that it is.” Probably verbatim. So I made <a href="https://sheriff.sheriffcloud.com/">Sheriff</a>, a static site generator in Goblin itself.</p><p>Just to show that Goblin wasn’t a toy or a DSL.</p><p>And things were looking up.</p><h3>Now It’s Totally Out of Control</h3><p>I told myself not to just “keep adding features.” Keep it simple. Elegant. Capable. So how is that working out?</p><p>Goblin now has a virtual machine called Vampire (VMpire; I thought the name was cute and a good complement to Goblin), garbage collection, concurrency and actors, workers, and a complete set of object-based primitives that lend themselves well to simulation and games, which I call the Dynamic Entity System (DES). I have a WASM.</p><p>Shit kind of went off the rails.</p><p>And it’s all my fault.</p><h3>I Tell Myself I Need Those Things</h3><p>You see, my problem is this: I try to make cool shit with Goblin. I really do. And in that process, I find out that it sucks at some things. And it hurts. It’s my baby, my child. I want to do things with it. Play catch, so to speak. But then you find out your kid is afraid of the ball. Or he’d rather stay inside and watch true crime documentaries.</p><p>The kid wasn’t born a champion athlete.</p><p>And that’s okay.</p><p>But deep down inside, you know he wants to be. I can just tell. So I have to put in some extra work. No big deal. I have to teach him how to become a man. That’s all. Because as a parent, your number one job is to keep your kid from dying. I don’t make the rules. And since there is only one here — not like in the 1800s when you had as many kids as possible in case some of them perished from consumption or dysentery or a freak wagon wheel crushing accident — you have to be tender with it.</p><p>So Goblin. I don’t want it to die and I want it to be a badass. So whenever I hit a snag — friction — I figure out how to eliminate that friction or make it work.</p><p>So that’s why I’ve hamfisted this programming language into having all those features I originally warned myself about but didn’t heed.</p><h3>The Terrible Mistake</h3><p>So now I have all these things implemented. I have a static site generator. Plans for a web framework (Thistle). Plans for a huge world-building simulator. I have a package manager in the works.</p><p>I can’t quit, not now. I have to see this through. People are counting on me. (At the present time there are <a href="https://github.com/ddonche/goblin-lang">4 stars for Goblin on Github</a>.) I cannot let those people down.</p><p>I have to write books. Make an online course. Make videos. <a href="https://goblintuts.com/">I’ve started writing tutorials</a>. It is pure, unadulterated madness! There’s too much at stake. The sunk cost fallacy prevents me from throwing in the towel.</p><p>So I tarry on. For you. For Goblin.</p><p>I dare not ask myself what’s next. As the features pile up like turds in a toilet that doesn’t flush, I wonder how this thing will play out. And if you’re reading this, see my plight. Hear it well. Pandora is already out of the box. Or was it her box and some other stuff got out? I can’t remember. So you might as well join me, if you like being a part of absolutely amazing projects that are definitely going somewhere big.</p><p>Anyway, I’m definitely not adding any more features.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7498797728c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Option and Result, Translated: How Goblin Handles What Rust Wraps]]></title>
            <link>https://medium.com/@dandonche/option-and-result-translated-how-goblin-handles-what-rust-wraps-54c9eb6bfb6a?source=rss-6cb0562f1653------2</link>
            <guid isPermaLink="false">https://medium.com/p/54c9eb6bfb6a</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[rust-programming-language]]></category>
            <category><![CDATA[programming-languages]]></category>
            <dc:creator><![CDATA[Daniel Donche Jr.]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 17:40:42 GMT</pubDate>
            <atom:updated>2026-06-30T17:40:42.863Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H-QiOGbXhhEYqKyIHnI1Cw.png" /></figure><p>If you’ve spent any time around Rust, you’ve run into a wall of vocabulary that sounds more intimidating than it is: Option&lt;T&gt;, Result&lt;T, E&gt;, unwrap(), map(), the ? operator. None of it is magic. Each one exists to solve a specific, ordinary problem — and once you see the problem plainly, the Rust solution stops looking like wizardry.</p><p>Goblin solves the same problems. It just refuses to wrap them in ceremony. Below, every Rust example is followed immediately by the Goblin line that does the exact same thing, to the exact same variable.</p><h3>The First Problem: A Value Might Not Exist</h3><p>This is the most common situation in all of programming. You ask for something — a name, a config value, a parsed field — and there’s a real chance it isn’t there.</p><p>Rust refuses to let you touch a value that might not exist without first acknowledging that possibility. It wraps the value in a box called Option&lt;T&gt;, with two possible labels:</p><pre>Some(value)   // something is in the box<br>None          // the box is empty</pre><p>To make this concrete: imagine you’ve parsed a portal’s config file into a map, and you’re reading out the &quot;title&quot; key. Not every portal bothers to set a custom title — some config files just leave it out — so what you get back might or might not be there.</p><pre>let config_title: Option&lt;&amp;str&gt; = parsed_config.get(&quot;title&quot;);<br>// config_title is Some(&quot;My Portal&quot;) if the config set a title,<br>// or None if it never did.</pre><pre>config_title | cfg[&quot;title&quot;]<br>/// config_title is &quot;My Portal&quot; if the config set a title,<br>/// or nix (nil/empty) if it never did.</pre><p>Goblin has no Option&lt;T&gt;, no Some, no None. It just asks one question — is this nil or empty? — and config_title either has a value or it doesn&#39;t. Everything below operates on this same config_title, in both languages.</p><p><strong>1. Forcing the value out</strong></p><pre>let title = config_title.unwrap();<br>// If config_title is None, this line crashes the program right here.</pre><p>Goblin has no equivalent, and it’s worth saying plainly instead of stretching for one. Reading a nix value in Goblin never crashes — config_title is simply nil or empty, and the program keeps running. If you genuinely want a hard stop when a value is missing, you write that check yourself:</p><pre>if config_title.nix?<br>    :say(&quot;config_title was required but missing.&quot;)<br>    send ..<br>xx<br>title | config_title</pre><p>There’s no built-in “unwrap or die” operator, because the whole nix model is built around values being safe to read even when they’re absent.</p><p><strong>2. Using a fallback</strong></p><pre>let title = config_title.unwrap_or(&quot;Untitled Site&quot;);<br>// If &quot;title&quot; was never set, title becomes &quot;Untitled Site&quot; instead of crashing.</pre><pre>title | config_title ?? &quot;Untitled Site&quot;</pre><p>Plain English: <em>use config_title — but if it’s nix, use “Untitled Site” instead.</em></p><p>The right side of ?? isn&#39;t locked to one shape. It&#39;s whatever value actually makes sense at that spot in the code:</p><pre>title | config_title ?? ..              /// fall back to an empty string<br>title | config_title ?? nil             /// fall back to nil, and let it propagate<br>title | config_title ?? &quot;Untitled Site&quot; /// fall back to a literal string<br>title | config_title ?? page_name       /// fall back to a variable already in scope — say, a title derived earlier from the filename<br>title | config_title ?? false           /// fall back to a boolean<br>title | config_title ?? default_title() /// fall back to the result of another call</pre><p>Rust’s unwrap_or(default) can do this too, technically — but the value has to already be the same type as what&#39;s inside the Option, and producing it often means a second function call (unwrap_or_else(|| ...)) just to compute that fallback. Goblin doesn&#39;t draw that line. The fallback is just the next expression after ??, full stop.</p><p>.. is Goblin&#39;s shorthand for an empty string. Not &quot;similar to&quot; an empty string — literally, character-for-character, it. These two lines do the exact same thing:</p><pre>title | config_title ?? ..</pre><pre>title | config_title ?? &quot;&quot;</pre><p><strong>3. Transforming only if present</strong></p><pre>let trimmed_title = config_title.map(|t| t.trim());<br>// If config_title is Some(&quot;  My Portal  &quot;), trimmed_title becomes Some(&quot;My Portal&quot;).<br>// If config_title is None, trimmed_title stays None — trim() never runs.</pre><pre>trimmed_title | config_title<br>if !config_title.nix? =&gt; trimmed_title |= :trim(config_title)</pre><p>Plain English: <em>start with config_title as-is; only overwrite it with a trimmed version if it actually had something in it.</em></p><p>That’s the literal translation — it preserves the same distinction map() preserves, between &quot;never had a value&quot; and &quot;had a value, now transformed.&quot; In practice, Goblin code rarely bothers with that distinction, because once something is nix, the usual next step is &quot;treat it as empty and move on&quot; rather than &quot;remember it was specifically absent.&quot; That&#39;s why real Goblin code — like Sheriff&#39;s own s_trim — collapses straight to empty instead:</p><pre>act s_trim(v)<br>    if v.nix? =&gt; send ..<br>    return :trim(v)<br>xx</pre><p><strong>4. Early bail</strong></p><pre>fn get_trimmed_title(parsed_config: &amp;HashMap&lt;String, String&gt;) -&gt; Option&lt;String&gt; {<br>    let config_title = parsed_config.get(&quot;title&quot;)?; // bail out with None right here if &quot;title&quot; was never set<br>    Some(config_title.trim().to_string())<br>}</pre><pre>act get_trimmed_title(cfg)<br>    config_title | cfg[&quot;title&quot;] ?? =&gt; send ..<br>    return :trim(config_title)<br>xx</pre><p>Plain English: <em>pull “title” out of the config — if it isn’t there, stop immediately and hand back empty. Otherwise, trim it and return the result.</em></p><p>Same shape as the Rust function: extract and bail in one motion, then do the actual work on the line after. send is just return, with a faster keystroke. These two lines do the exact same thing:</p><pre>send value</pre><pre>return value</pre><p>The convention in Goblin is to use send for an early exit partway through a function, and save return for the function&#39;s final result — but that&#39;s a style choice for readability, not a rule the language enforces.</p><p>Notice what’s missing from all four of these: there’s no box to open, no separate function call to specify a default, no preserved distinction between “missing” and “transformed-to-nothing” unless you explicitly write the check for it. The fallback is written directly at the point where the value is being used, and you choose exactly what it falls back to.</p><p>?? also naturally forms fallback chains. This line is real code, pulled straight from Sheriff&#39;s wikilink resolver (the TrailBoss module) — src_norm is a page&#39;s file path, and prefix/prefix2 are two different possible folder prefixes that path might start with, depending on which portal it lives under:</p><pre>rel | :keep_after(src_norm, prefix) ?? :keep_after(src_norm, prefix2) ?? ..</pre><p><em>Try stripping the first prefix off the path. If that didn’t match anything, try the second prefix. If neither matched, fall back to empty.</em> That’s three fallback layers, expressed as one readable line, with no nesting and no unwrapping.</p><h3>The Second Problem: An Operation Might Fail</h3><p>This is a different problem from “the value might not exist.” A value can be perfectly well-defined and still fail to produce — a file might not open, a network call might time out, a parse might choke on bad input. Rust keeps this separate from the missing-value problem with Result&lt;T, E&gt;:</p><pre>Ok(value)    // the operation succeeded, here&#39;s the value<br>Err(error)   // the operation failed, here&#39;s why</pre><p>Take reading a portal’s config file off disk. The file might simply not exist — but it might also exist and still fail to read: locked, corrupted, permission denied. That’s a Result, not an Option.</p><pre>let body = std::fs::read_to_string(path)?;<br>// If reading the file fails for any reason, this line stops the<br>// function immediately and hands the error up to the caller.</pre><pre>body | :read_text(path) !! =&gt; send ..</pre><p>Plain English: <em>try to read the file at this path — if that throws an error, stop and return empty.</em></p><p>!! is the failure-handling counterpart to ??. Where ?? catches a nix value, !! catches a thrown error — a different problem, handled with a different operator, on purpose.</p><p>For multi-step error handling, Rust reaches for a match:</p><pre>match risky_operation() {<br>    Ok(value) =&gt; value,<br>    Err(e) =&gt; handle_failure(e),<br>}</pre><pre>attempt<br>    risky_operation()<br>rescue<br>    handle_failure()<br>xx</pre><p>Plain English: <em>try this code; if something goes wrong, run this instead.</em></p><p>The principle is the same one Rust enforces with Result&lt;T, E&gt;: &quot;this value doesn&#39;t exist&quot; and &quot;this operation blew up trying to produce a value&quot; are not the same failure, and conflating them under one operator would be a real design mistake. Goblin avoids that mistake the same way Rust does — by keeping the two cases syntactically distinct — just without introducing a second wrapper type to do it.</p><h3>Sheriff Is the Proof</h3><p>None of the missing-value syntax above is theoretical. It’s the load-bearing pattern of real, working Goblin code. Pull almost any function out of a file like <a href="https://github.com/ddonche/sheriff">Sheriff’s </a>wikilink resolver (the TrailBoss module) and you’ll see it:</p><pre>act s_trim(v)<br>    if v.nix? =&gt; send ..<br>    return :trim(v)<br>xx</pre><pre>act path_norm(p)<br>    out | p ?? =&gt; send ..<br>    :update_where!(out, &quot;\\&quot;, &quot;/&quot;)<br>    return out<br>xx</pre><p>Two tiny functions, and between them: a nix check, a send, a ?? fallback, and an empty-string shorthand. That&#39;s the entire missing-value vocabulary, used exactly the way the rest of this article describes it — because this <em>is</em> where the description came from.</p><h3>The Big Point</h3><p>Rust solves “this might not exist” and “this might fail” by inventing formal types — Option&lt;T&gt; and Result&lt;T, E&gt; — and then forcing every piece of code that touches a risky value to unwrap it through one of a fixed set of methods. The compiler enforces this. You cannot accidentally treat an Option&lt;String&gt; as a plain String; the type system won&#39;t let you.</p><p>Goblin solves the same two problems with explicit control-flow operators instead of wrapper types. .nix? asks the question. ?? supplies the fallback, and lets you choose exactly what that fallback is. .. and send exist purely to keep the answer short. Nothing gets boxed; nothing gets unwrapped. The uncertainty lives in the flow of the code, written right where it matters, instead of living in a type you have to satisfy before the compiler will let you proceed.</p><p>Neither approach is inherently better. Rust trades verbosity for a guarantee: you cannot forget to handle the missing case, because the compiler won’t compile code that ignores it. Goblin trades that guarantee for legibility and control: you write the fallback exactly once, exactly where you want it, in plain syntax that reads like the sentence you’d say out loud — at the cost of nothing stopping you if you forget to write it at all.</p><p>That’s the honest trade. Rust moves uncertainty into the type system. Goblin moves it into the control flow.</p><p>If you’re coming from Rust, don’t think of Goblin as “Rust without Option.&quot; Think of it as a language that made a different decision about where uncertainty belongs.</p><p>Rust says uncertainty belongs in the type system. Goblin says uncertainty belongs in the flow of the program.</p><p>Once you understand that difference, the rest of Goblin’s syntax starts to make sense.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54c9eb6bfb6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Goblin Uses {} for Map Lookup]]></title>
            <link>https://medium.com/@dandonche/why-goblin-uses-for-map-lookup-67413692a6d7?source=rss-6cb0562f1653------2</link>
            <guid isPermaLink="false">https://medium.com/p/67413692a6d7</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[goblinlang]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Daniel Donche Jr.]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 23:20:03 GMT</pubDate>
            <atom:updated>2026-06-04T23:22:13.648Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecJpZ2X2vjyTCk1xLT2UYQ.png" /></figure><p>I’m building a programming language called Goblin. I’ve been doing this since August of last year. At some point you have to decide how map lookup works.</p><p><a href="https://medium.com/@dandonche/making-my-own-programming-language-fc56967c9f0b">Making My Own Programming Language</a></p><p>Every language I know of uses brackets:</p><pre>ctx[&quot;body&quot;]</pre><p>So does Goblin. Or it did, until I looked at a thousand-line file I wrote and couldn’t tell what was an array and what was a map.</p><p>That’s a problem I made. And I fixed it.</p><h3>The Thing Nobody Questions</h3><p>Arrays use brackets. Maps use brackets. That’s just how it is.</p><p>Except nobody ever decided that. It’s not a principle. It’s not a deliberate choice. It’s C, copied by C++, copied by Java, copied by Python, copied by JavaScript, copied by everyone else. Path dependency all the way down.</p><p>When you inherit a syntax from a language that inherited it from a language that inherited it from a language, you don’t get a design. You get sediment.</p><p>I don’t have a C compatibility requirement. I don’t have existing users I’ll break. Goblin is mine and I can ask the actual question:</p><p><em>Are array lookup and map lookup the same operation?</em></p><p>They aren’t.</p><h3>Two Different Things</h3><p>An array lookup is positional:</p><pre>routes[0]</pre><p>This means: give me whatever is at position zero. It doesn’t know what it is. It doesn’t care. It’s a slot in an ordered list, and I’m asking for the slot by number.</p><p>A map lookup is keyed:</p><pre>ctx[&quot;body&quot;]</pre><p>This means: give me the value stored under the key &quot;body&quot;. There&#39;s no position. There&#39;s no order. There&#39;s a name and a value and I&#39;m asking by name.</p><p>These are different ideas. They happen to return a value in both cases, which is probably why nobody separated them. But the <em>intent</em> is completely different, and intent is what code is supposed to communicate.</p><h3>What the Real Problem Looks Like</h3><p>Here’s actual Goblin code from a file I wrote:</p><pre>ctx    | fences[&quot;ctx&quot;]<br>portal | fences[&quot;portal&quot;]<br>out    | fences[&quot;work&quot;]</pre><p>And later:</p><pre>lines |= :split(inner, &quot;\n&quot;)<br>for line in lines</pre><p>fences is a map. lines is an array. But you cannot tell that from the lookup syntax. You have to know it. You have to trace the variable back to where it was assigned, figure out whether it&#39;s a map or an array, and <em>then</em> the lookup makes sense.</p><p>That is a failure of communication. The code is not saying what it means.</p><p>The worst part: when I came back to sections of this file, I had to read backwards to understand forwards. In a file I wrote. That’s not acceptable.</p><h3>The Fix</h3><p>Goblin uses {} for maps everywhere:</p><pre>ctx | {<br>    body: html<br>    portal: &quot;goblin&quot;<br>}</pre><p>So map lookup uses {} too:</p><pre>ctx{&quot;body&quot;}</pre><p>The rule is simple:</p><pre>array[index]   → positional lookup<br>map{key}       → keyed lookup</pre><p>Now look at the same code:</p><pre>ctx{&quot;body&quot;}<br>ctx{&quot;portal&quot;}<br>routes[0]<br>lines[i]</pre><p>You know immediately. You don’t trace anything. You don’t infer anything. The syntax tells you.</p><h3>The Parser Isn’t Even Hard</h3><p>Some people will wonder about ambiguity. There isn’t any, in Goblin, because {} isn&#39;t doing double duty anywhere.</p><p>Goblin doesn’t use braces for blocks. It doesn’t use them for lambdas or closures or control flow. Braces mean map — at creation and at lookup.</p><p>The parser rule is clean:</p><pre>expr{expr}  →  map lookup</pre><p>If { immediately follows an expression on the same line, it&#39;s a lookup. If it starts a new statement, it&#39;s a map literal. That&#39;s it. No ambiguity to resolve.</p><h3>Why Other Languages Didn’t Do This</h3><p>They could have. The idea isn’t clever. It’s obvious once you ask the question.</p><p>But most languages never asked the question because they inherited the answer. When you start from C’s [] and work forward, you&#39;re not designing — you&#39;re maintaining backwards compatibility with a choice nobody made on purpose.</p><p>Goblin started from scratch. I didn’t ask “what do other languages do.” I asked “what should this mean.” Those are different questions and they get you to different places.</p><h3>The Broader Principle</h3><p>This is the thing I keep coming back to when I design Goblin:</p><p><em>Can you tell what’s happening by looking at it?</em></p><p>Goblin uses &gt;&gt; for member access, so . is free for function calls. You see x.len and you know it&#39;s a method. You see x&gt;&gt;y and you know it&#39;s reaching into a structure.</p><p>You see ctx{&quot;body&quot;} and you know it&#39;s a map lookup. You see routes[0] and you know it&#39;s positional.</p><p>Every operator carries its own semantics. Nothing is overloaded to mean two different things. The code says what it means.</p><p>That’s the goal. Not novelty. Not being different for the sake of it. Just: the code should say what it means, and you should be able to read it without loading context into your head first.</p><p>{} for map lookup is one small piece of that. But it&#39;s the kind of small piece that matters when you&#39;re reading a thousand lines of code at two in the morning trying to figure out why something is broken.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67413692a6d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Password Generator Recipe with Goblin]]></title>
            <link>https://medium.com/@dandonche/password-generator-recipe-with-goblin-05978b30b387?source=rss-6cb0562f1653------2</link>
            <guid isPermaLink="false">https://medium.com/p/05978b30b387</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Daniel Donche Jr.]]></dc:creator>
            <pubDate>Wed, 03 Jun 2026 02:19:02 GMT</pubDate>
            <atom:updated>2026-06-03T02:30:06.986Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tngZCRxbh5uAEFOSltGDvg.png" /><figcaption>The full script in 15 lines</figcaption></figure><p>This recipe shows how to generate secure, randomized passwords using Goblin’s powerful features. Each password combines random numbers, letters, and special characters, with a minimum length requirement of 16 characters. You can change this to whatever you want (12, 14, etc.). The beauty of this recipe is we will be leveraging several powerful Goblin features like `pick`, `pack`, and `mixed`.</p><h3>Ingredients</h3><p>- Random numbers (3–8 digits)<br>- Random letters (5–12 characters)<br>- Random special characters (2–5 symbols)<br>- A dash of randomization for case mixing and shuffling</p><h3>Step 1: Prepare Your Symbol Collection</h3><p>First, create a collection of special characters to use in your passwords:</p><pre>symbols | raw &quot;!@#$%^&amp;*()-_=+[];:&lt;&gt;?&quot;</pre><p>We use the `raw` keyword here so we don’t get any weird escaping errors later.</p><h3>Step 2: Set Up Your Password Factory</h3><p>Create an action that will generate 10 password options:</p><pre>act generate_password<br>   symbols | raw &quot;!@#$%^&amp;*()-_=+[];:&lt;&gt;?&quot;<br>   repeat 10<br>   /// Recipe continues inside this loop…<br>   xx<br>xx</pre><h3>Step 3: Determine Random Quantities</h3><p>For each password, decide how many of each character type to use:</p><pre>n, l, s | [ secure_pick 1 from 3..8, secure_pick 1 from 5..12, secure_pick 1 from 2..5 ]</pre><p>For this we are using exclusive ranges with `..` but you can use inclusive `…` instead if you like.</p><p>This gives you:</p><p>- `n`: A random number between 3–7 (how many numeric digits to use)<br>- `l`: A random number between 5–11 (how many letters to use)<br>- `s`: A random number between 2–4 (how many symbols to use)</p><p>Notice here that we also use the tuple assignment with an array on the right side so we can keep it all on one line. Otherwise you’d have to do:</p><pre>n | pick 1 from 3..8<br>l | pick 1 from 5..12<br>s | pick 1 from 2..5</pre><h4>Warning</h4><p>If you want a secure password, you must use [[secure_pick]] instead of just `pick`. Both will work for this, but only one is truly secure.</p><h3>Step 4: Generate Character Arrays</h3><p>Create arrays of each character type:</p><pre>nums_arr | secure_pick {n} from 0…9 with dups<br>letters_arr | secure_pick {l} from &quot;a&quot;…&quot;z&quot; with dups<br>sym_arr | secure_pick {s} from symbols with dups</pre><p>Instead of hardcoding the pick count, we can use interpolation with the variables we got above using `{n}`, `{l}`, and `{s}`. Just put your variable name inside the braces.</p><p>Here you also see that we can also pick a range of letters `from “a”…”z”` (note the inclusive `…`) instead of just numbers. Lastly, we allow duplicates in the result. If you don’t want duplicates, you can use `without dups` or `wo dups` instead.</p><h3>Step 5: Pack Arrays Into Strings</h3><p>Transform your arrays into usable string components:</p><pre>numbers | :pack(nums_arr).str<br>letters | :pack(letters_arr).mixed<br>syms | raw pack(sym_arr)</pre><p>Because `secure_pick` generates an array in these circumstances, we then use `pack` to “compress” them into one number string for each. In other words, we can turn [1, 2, 3] into “123”, and so on. Note that you can do the inverse of this by using `unpack` to turn a string or number into an array! So `unpack(123)` becomes [1, 2, 3].</p><h4>Note:</h4><p>- `.str` converts the packed numbers to a string<br>- `.mixed` randomly applies uppercase to some letters<br>- `raw` helps escape any special characters</p><h3>Step 6: Combine Components</h3><p>Merge your components into a single string:</p><pre>password | (numbers + letters + syms)</pre><p>Now we take all three strings and combine them into one string. Something like “123456aBcDeFgH!@#”.</p><p>Also note that we used `+` here for the concatenation, which means we don’t want a space involved. If you want a space, you can always concatenate with `++` and it will automatically add a space! So `”Dave” ++ “Mustaine”` produces “Dave Mustaine” while `”Dave” + “Mustaine”` produces “DaveMustaine”.</p><h3>Step 7: Check Password Length &amp; Finalize</h3><p>Ensure the password meets minimum security requirements and shuffle for extra security:</p><pre>if password.len &gt;= 10 =&gt; :say (secure_shuffle(password.raw))</pre><p>Lastly, if the generated result is greater than or equal to our minimum password requirement, we print it after randomly shuffling (securely) the characters. We do this with the keyword `say`. Also note that `shuffle` can be done on a string or a collection.</p><h3>Step 8: Call Your Recipe</h3><p>Finally, run your password generator:</p><pre>generate_password()</pre><h3>Sample Output</h3><p>Here you can see some of the passwords you can generate using this exact script:</p><pre>3FbA460egzm^&amp;C&lt;B]<br>bX4Ssn7H6!39ekP9$JL<br>V95d7n!_&amp;x93j)23<br>4On9QA3#h=y&amp;t4G$o<br>ac2q8Q(V4k)ePKL$<br>]XbbgIs55s6nNpk9[<br>r#9x2icROor75&gt;QA6l</pre><p>Why not ten passwords? Why only seven? Remember, we set the minimum password length to 10, so any that don’t meet that requirement don’t get printed. In this case, there were 3 passwords that weren’t 10 characters long.</p><h3>Tips for those in the Horde</h3><p>- Adjust the number ranges to create passwords of different strengths<br>- Change the minimum length (10) if you need shorter or longer passwords<br>- Add more special character options to the symbols string for extra variety<br>- Change the `with dups` flag to `without dups` if you don’t want repeated characters</p><h3>Full Script</h3><pre>act generate_password<br>   symbols | raw &quot;!@#$%^&amp;*()-_=+[];:&lt;&gt;?&quot; <br>   repeat 10 <br>     n, l, s | [ secure_pick 1 from 3..8, secure_pick 1 from 5..12, secure_pick 1 from 2..5 ] <br>     nums_arr | secure_pick {n} from 0…9 with dups <br>     letters_arr | secure_pick {l} from &quot;a&quot;…&quot;z&quot; with dups <br>     sym_arr | secure_pick {s} from symbols with dups <br>     numbers | :pack(nums_arr).str <br>     letters | :pack(letters_arr).mixed <br>     syms | :pack(sym_arr).raw <br>     password | (numbers + letters + syms) <br>     if password.len &gt;= 10 =&gt; :say (secure_shuffle(password.raw)) <br>   xx<br>xx<br>generate_password() </pre><h3>Try It Yourself</h3><p>Adjust the script to suit your needs and then try it out yourself!</p><p>- Save the full script as `password.gbln`. <br>- From the correct directory (where you saved it), run `goblin run password.gbln` from your shell.<br>- Or test it in the server by saving it into the `api` directory, then run `goblin start`. Then in your browser, visit `<a href="http://localhost:5173/api/password%60">http://localhost:5173/api/password`</a> and see it in your browser!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=05978b30b387" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vekke: Notes on Building an Evergreen Abstract Strategy Game from Scratch]]></title>
            <link>https://medium.com/@dandonche/vekke-notes-on-building-an-evergreen-abstract-strategy-game-from-scratch-746a83fbd620?source=rss-6cb0562f1653------2</link>
            <guid isPermaLink="false">https://medium.com/p/746a83fbd620</guid>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[board-game-design]]></category>
            <dc:creator><![CDATA[Daniel Donche Jr.]]></dc:creator>
            <pubDate>Tue, 03 Mar 2026 23:13:09 GMT</pubDate>
            <atom:updated>2026-03-03T23:13:09.980Z</atom:updated>
            <content:encoded><![CDATA[<p>Some of the best designs arise from constraints. Perhaps that is what makes Vekke so elegant.</p><p>Maybe elegant isn’t the right word for me to use. That’s for <em>you </em>to decide. Whatever the case, my goal was to design a board game that was simple as fuck mechanically while being deep as fuck strategically.</p><p>Obviously, I thought about Chess and Go.</p><p>Two timeless games that fit that criteria. Centuries old. Something you can teach in a few minutes but it takes a lifetime to master. <em>That’s</em> what I wanted to create. Or at least try to.</p><p>And I think I did just that. But before we explore that, you should know…</p><h3>This wasn’t meant to be an actual game at first.</h3><p>This game’s sole purpose initially was to serve as a game inside another game (think Gwent from <em>The Witcher</em> or Caravan from <em>Fallout </em>or Tak from <em>Kingkiller Chronicles</em>) that was really a cipher. This was in 2014. Basically, I had this mystery game I was putting together (like Hunt a Killer) and one of the clues you were to discover was to lead you to a website with rules for a game called Betaori. The movement notation of that game was a secret code needed to get further in the other game.</p><p>I hope that made sense.</p><p>The game was originally a prop: a fake board game called Betaori whose movement ‘routes’ were actually a cipher. Players would find the rules online and use them to decode clues in a larger mystery box-style experience. The mystery project died, but Betaori lived on.</p><p>Perhaps there was something there…</p><h3>The not-game-at-first would now become a real game.</h3><p>Now that you have the backstory, we can move on. I no longer needed the game to be a cipher, but I loved how the routes worked in that original version. So I kept it. What does that look like?</p><ul><li>game uses a 6x6 grid board</li><li>a route is a pairing of direction and distance</li></ul><p>A route might be ‘two spaces up’ or ‘three diagonally left’ — simple vectors, no numbers on the icons themselves.</p><h3>Classic Design Inspiration</h3><p>So that was my starting point. From there I took inspiration from Chess and Go for other design constraints. I like how Go uses identical pieces. I like the look of the stones. So I chose blue and white (a throwback to the Betaori thing; this name came from Beta Orionis — Rigel — the brightest start in Orion. It shines blue and white I think).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AVTTGxkqK2DHsLeu" /><figcaption>Photo by <a href="https://unsplash.com/@elenapopova?utm_source=medium&amp;utm_medium=referral">Elena Popova</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>From Chess I took the idea of landing on enemy pieces to capture them. I also took the idea of surrounding pieces from Go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wv3azuN3PhIQM8w-" /><figcaption>Photo by <a href="https://unsplash.com/@jeshoots?utm_source=medium&amp;utm_medium=referral">JESHOOTS.COM</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>And that was it. The basics of the game were set. You have identical pieces, you have routes that tell you where you can move, and you can either capture or surround.</p><h3>Movement</h3><p>Since the board allows movement in 8 directions, and since it’s only 6x6, I made an original set of 24 routes. Each direction has distances of 1, 2, and 3 spaces.</p><h3>Playtesting and Iteration</h3><p>I tested early versions on paper and cardboard, then got a prototype from The Game Crafter. I made a rulebook. I played with other folks.</p><p>It was all but finished.</p><p>And then I set it aside. This was mostly because I played with a kid who figured out a loophole in the rules and I would have to go in and update the rulebook and all that shit. I thought, “I’ll do this later.” That was in 2022.</p><h3>Final Iteration</h3><p>A few months ago (January 2026) I realized that I was sitting on a pretty good game that I could (should) be releasing. So I dusted it off. I played again with a friend who was an avid board gamer. We figured out how to make it better.</p><p>At this time you should know that I was also heavily invested in my own programming language (Goblin) and a static site generator made from that language (Sheriff). So I was programming every day.</p><p>I decided to make a version I could play on my computer to continue iterating and tweaking. I got it to work and I began to play…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CIGYruNqYI6zvPplnJdmYw.png" /><figcaption>an early version of the online game</figcaption></figure><h3>Token Economy</h3><p>During digital playtesting, I added a token economy: reserves in the back, captives from captures, and spending captives to the void for actions like early route swaps or ransoms. It turned out to add huge depth — timing when to reinforce or yield became half the game.</p><h3>Socialization and Play Styles</h3><p>The last great discovery (perhaps the greatest) was figuring out that there were different play styles we could lean on. One of the greatest tragedies in gaming history (in my opinion) is the fact that Legend of the Five Rings is no more. I really liked the clan feature they had. This served as the primary inspiration for the 9 Vekke Orders. Finally, each Order would get its own token and route sets to visually set them apart from each other.</p><h3>Preparing for Release</h3><p>With all of this in place, I’m currently in the process of finalizing all the features needed for online play. Currently I have:</p><ul><li>Play vs 6 AI levels</li><li>ELO ratings</li><li>PVP + invite and challenge from site</li><li>Chat</li><li>9 different Orders (clans, guilds, schools) to choose from</li><li>skin swapping</li><li>player profile</li><li>leaderboard</li><li>onboarding tutorial walkthrough</li><li>rules wiki (made from Sheriff and Goblin!!!)</li><li>site announcements</li><li>mobile and web friendly</li></ul><p><strong>Coming soon:</strong></p><ul><li>home page</li><li>skin (tokens, routes, boards) marketplace</li><li>pro accounts</li><li>seasons</li><li>puzzles</li><li>tournaments</li><li>challenges</li><li>push notifications</li></ul><p>Needless to say I am almost ready for launch. The site will be up at <a href="http://vekke.net/">vekke.net</a> and when it is, you can <a href="https://vekke.net/invite/eda57bd5-fdde-4fd5-b662-4f21352861bf">use my invite link</a> to sign up and start playing! Want a preview? This is what the game looks like right now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XD61lchodEutBt5ZA5S__A.png" /><figcaption>current iteration of online site</figcaption></figure><p><em>Last few notes. Because the original game was called Betaori (meant for the mystery game), I realized this might conflict with Mahjong (which has a betaori thing). So I changed the name to Vekke, which means “awaken” in Norwegian. Full transparency, though, I used that name because I already had the domain and I wasn’t using it.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=746a83fbd620" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built 1,000 Pages in 26 Seconds With a Programming Language I Made Four Months Ago]]></title>
            <link>https://medium.com/@dandonche/i-built-1-000-pages-in-26-seconds-with-a-programming-language-i-made-four-months-ago-3a6b17e25c8c?source=rss-6cb0562f1653------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a6b17e25c8c</guid>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Daniel Donche Jr.]]></dc:creator>
            <pubDate>Fri, 05 Dec 2025 19:13:45 GMT</pubDate>
            <atom:updated>2025-12-05T19:30:57.507Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>August 10th:</strong> I open a <a href="https://github.com/ddonche/goblin-lang">Git repo</a> and start taking notes on a programming language idea.</p><p><strong>December 5th:</strong> That language just built 1,000 web pages in 26 seconds.</p><p>I’ve learned a lot since <a href="https://medium.com/@dandonche/making-my-own-programming-language-fc56967c9f0b">my first post about this</a>, but one thing is for certain: I still don’t know what I’m doing.</p><h3>Let’s Talk About Sheriff</h3><p>To bring you up to speed: I made a programming language called Goblin (links above). After that I thought, “Goblin needs documentation.” This is a natural succession. It felt like the right thing to do. Every language needs docs. Because people besides me might want to make shit. They’ll need instructions. Examples that don’t suck. I have an opportunity here to write documentation I wish other languages had.</p><p>So I look around for something to build the docs site with.</p><p>I try <a href="https://docusaurus.io/">Docusaurus </a>first. This was a fucking terrible idea. I hate everything about it. Also it’s JavaScript, which as I mentioned, can go fuck itself. Everything feels scattered all over place. Where do I change the logo? Where do I change the nav menus? How do I edit the home page? Everything feels fucking out of place. To be fair, maybe I’m just stupid and their guy Seb on X did try to talk me off the ledge.</p><p>It didn’t change my mind. So I switch to <a href="https://squidfunk.github.io/mkdocs-material/">Mkdocs</a>.</p><p>I like this one better. But during the process of putting my docs on here, I get the sudden idea: “Why not just build a static site generator in Goblin? Then I can use it to build Goblin’s own documentation site.”</p><p>This is what they call, “eating your own dog shit.” Or something like that.</p><p>So that is what I do. I build <strong>Sheriff</strong> — a full static site generator written entirely in Goblin. I call it that because it sounds cool and I get to say, “There’s a new Sheriff in town.”</p><p>Sheriff takes markdown files with YALL frontmatter (because YAML turned out to <em>also </em>be a pain in the asshole, I created my own version), runs them through a bunch of modules (navigation generation, table of contents, theming, widgets, converts wiki links, all that), renders templates, and spits out a complete static site.</p><p>I wanted it to be easy on the end user. “Just edit this and this, put your logo here” type of thing. The entire project is under 10,000 lines of Goblin code.</p><p>It works. I’m almost done with it. And the best part is I get to fix Goblin whenever I hit a wall with Sheriff. I’m eating my own dog shit.</p><h3>The Benchmark</h3><p>While I build Sheriff I’m testing it in real time. I have a number of markdown files I run through the pipeline. Just to see how all the shit is coming along. Well, yesterday I got curious. How long does it take to make my Sheriff site?</p><pre>goblin run main.gbln → exit 0 in 315ms (0.315s)</pre><p>Not bad. But that only made me want to see what happens when I throw real work at Sheriff. Not 10 pages. Not 50. 1,000 pages. Because a thousand pages is a lot. I don’t even know if anyone’s ever seen that many pages in real life.</p><p>So I generated a thousand markdown files with frontmatter and content (see below the undeniable proof), pointed Sheriff at them, and hit run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AI-VIPPHNEx7YWF7VvxJug.jpeg" /><figcaption>undeniable proof</figcaption></figure><p><strong>26.7 seconds.</strong></p><p>That’s about 26–27 milliseconds per page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*licGA6xwfbFnLEKPD1djRw.jpeg" /><figcaption>more undeniable proof</figcaption></figure><p>That’s not bad for my first benchmark. These results made me feel like Johnny after he beat the Devil in the fiddle contest (that one that took place down in some remote portion of Georgia), whereupon he won a golden fiddle, which the Devil laid upon the ground at his feet, which would have weighed about as much as a bowling ball (given that it was made of gold and gold’s density is 19.32 g/cm³ — almost exactly 10× denser than the average wood used in violins).</p><p>Anyway, it felt pretty cool.</p><p>But some interesting facts about this particular benchmark:</p><p><strong>No garbage collection.</strong> Memory just piles up. The OS cleans it up when the program exits. That’s it. You could really fuck yourself here, probably. What if your blog had a hundred thousand pages? A million?</p><p><strong>No optimization.</strong> The interpreter does what it’s told, in order, with zero cleverness. I haven’t profiled anything. Haven’t rewritten hot loops. This is Goblin as it exists right now, warts and all.</p><p><strong>No concurrency.</strong> Single-threaded. Processing one page at a time like it’s 1995.</p><p><strong>No tuning.</strong> I literally just ran the benchmark to see what would happen.</p><p>For each of those 1,000 pages, Sheriff is:</p><ul><li>Reading the markdown file</li><li>Parsing frontmatter</li><li>Converting markdown to HTML</li><li>Running it through multiple processing modules (navigation, table of contents, theming, syntax highlighting, debug info)</li><li>Rendering templates</li><li>Writing output files</li><li>Creating directories as needed</li></ul><p>All of that. A thousand times. In 26.7 seconds.</p><p>I’ll be honest: I didn’t know if it would even finish. I half-expected it to shit the bed around page 300. But it didn’t shit the bed at all. Good job, Sheriff! (There’s a new Sheriff in town.)</p><h3>What This Actually Means</h3><p>For context, here’s how other static site generators handle similar workloads (to be fair, I got these numbers from several AIs):</p><ul><li><a href="https://gohugo.io/"><strong>Hugo</strong> </a>— Go (compiled), 100k+ lines, ~1–2 seconds seconds</li><li><a href="https://www.getzola.org/"><strong>Zola</strong></a> — Rust (compiled), single binary, often &lt;1 second</li><li><a href="https://www.11ty.dev/"><strong>Eleventy</strong></a> — Node.js (JIT), 20k+ lines, ~10–30 seconds</li><li><a href="https://jekyllrb.com/"><strong>Jekyll</strong></a> — Ruby (interpreted), 50k+ lines, ~50–100 seconds</li><li><a href="https://astro.build/"><strong>Astro</strong></a> — JavaScript/TypeScript hybrid, modern framework, ~10–20 seconds depending on setup</li><li><strong>MkDocs</strong> — Python, geared for docs, generally a few seconds for medium sites</li><li><a href="https://github.com/ddonche/sheriff"><strong>Sheriff</strong></a> — Goblin (interpreted), &lt;10,000 lines, ~26 seconds</li></ul><p>So Sheriff is:</p><ul><li>Way faster than Jekyll</li><li>Competitive with Eleventy</li><li>Slower than Hugo</li></ul><p>That’s if the metrics are to be believed. But here’s the thing that makes this interesting:</p><p>Hugo is written in Go. Compiled, not interpreted. It’s got over 100,000 lines of code. It’s been refined by teams of people over ten years. It’s fast as hell because it’s supposed to be fast as hell. They have Goroutines and they only rebuild what’s changed, blah blah blah.</p><p>Sheriff is written in Goblin. Interpreted, not compiled. Under 10,000 lines. Four months old. Built by one person who didn’t even know how to make a programming language four months ago.</p><p>And it’s only 13x slower than Hugo.</p><p>So yeah. I feel like that kid who beat the Devil at fiddle.</p><p>I’m not saying Sheriff is better than Hugo. It’s not. Hugo is a beast. But for a brand new interpreted language with zero optimization, being in the same conversation as Hugo is wild.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nj0sykSJ1jrTNBuGmXlaMw.jpeg" /><figcaption>Sneak preview of the new Sheriff in town I told you about</figcaption></figure><h3>What’s Next</h3><p>Right now I’m in the middle of a major refactor. Goblin’s memory model wasn’t implemented correctly — variables were copying values instead of sharing references. I’m fixing that now.</p><p>Once that’s done, here’s what’s coming:</p><p><strong>Unified loop system</strong><br>Right now Goblin has for, while, and repeat. I&#39;m replacing all three with one keyword: repeat. Type-based dispatch figures out what you mean. repeat: 10 counts. repeat: items iterates. repeat: health &gt; 0 loops while true. One keyword, less bullshit.</p><p><strong>Memory introspection</strong><br>Functions like :mem_addr(x) (show me where this value lives in memory), :mem_total() (how much memory am I using?), :tether_count(x) (how many variables point to this?). I want memory to be visible and explorable, not hidden behind abstractions.</p><p><strong>Garbage collection</strong><br>Right now memory just accumulates until the program exits. Fine for batch work like Sheriff, but long-running stuff needs cleanup. I’m building a background GC that won’t pause execution.</p><p><strong>swarm parallelism</strong><br>The big one. Right now Sheriff processes pages one at a time. swarm will split the work across CPU cores automatically. Early estimates say this could be a 4-8x speedup.</p><p>If swarm even hits 4x, Sheriff would build 1,000 pages in about 6-7 seconds. That puts it on par with Eleventy and close to Hugo territory.</p><p>For an interpreted language. Four months old. Built by one idiot who thought “how hard could it be?”</p><p>Pretty cool if I manage to pull it off.</p><p><em>Note — if you look at the Goblin Lang repo on github, you’ll see a release (v0.1.0). That is not up to date as of the time of this post. Once I get the memory refactor done I’ll release the current version (which has new syntax anyway).</em></p><p>Follow the repo, star it:</p><p><a href="https://github.com/ddonche/goblin-lang">https://github.com/ddonche/goblin-lang</a><br><a href="https://github.com/ddonche/sheriff">https://github.com/ddonche/sheriff</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a6b17e25c8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Indentation and Delimiters in Goblin]]></title>
            <link>https://medium.com/@dandonche/indentation-and-delimiters-in-goblin-a3087bed89be?source=rss-6cb0562f1653------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3087bed89be</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming-languages]]></category>
            <dc:creator><![CDATA[Daniel Donche Jr.]]></dc:creator>
            <pubDate>Tue, 09 Sep 2025 05:13:27 GMT</pubDate>
            <atom:updated>2025-09-19T17:24:19.568Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7ToRq7F-J3EV67-6" /><figcaption>Photo by <a href="https://unsplash.com/@karthikswarnkar?utm_source=medium&amp;utm_medium=referral">Karthik Swarnkar</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>It comes to pass that everyone making their own programming language encounters a choice: how to parse the end of a code block. Common methods are with opening and closing braces (C style languages), indentation (Python), or end (Ruby, Lua, Elixir).</p><pre>// in-line braces<br>fn some_function() {<br>    ...<br>}<br><br>// new line braces<br>fn some_function <br>{<br>   ...<br>}<br><br>// indentation only<br>fn some_function  <br>    ...<br><br>// end with end<br>def some_method<br>    ...<br>end</pre><p>Some of it comes down to what you want the syntax to look like, but some of it comes down to how much of a pain in the ass you want the parser to cause you.</p><p>Some of it comes down to how much you want the end user to whine about your design choice. For example, some people complain about Python forcing you to use 4 spaces for indentation. No tabs, no other spacing.</p><p>If you choose the braces method, you have to determine in your parser if you want those to be in line with the header, on the next line by itself, or both (see above).</p><p>You also have to consider nesting.</p><h3>Goblin’s Syntax</h3><p>For Goblin, I chose a mixture of several different things. First, you don’t put the opening braces. You only have to close out your code block with either <em>xx</em> (crossbones closer) or <em>end</em>. You can mix and match these.</p><pre>/// end style<br>grade = <br>    judge<br>        score &gt;= 90: &quot;A&quot;<br>        score &gt;= 80: &quot;B&quot;  <br>        score &gt;= 70: &quot;C&quot;<br>        score &gt;= 60: &quot;D&quot;<br>        else:        &quot;F&quot;<br>    end<br><br>/// brace style<br>grade = <br>    judge<br>        score &gt;= 90: &quot;A&quot;<br>        score &gt;= 80: &quot;B&quot;  <br>        score &gt;= 70: &quot;C&quot;<br>        score &gt;= 60: &quot;D&quot;<br>        else:        &quot;F&quot;<br>    xx</pre><p>We reserve open curly braces for interpolation and maps only.</p><pre>/// string interpolation<br>string_name = &quot;Some text {variable_name}&quot;<br><br>/// maps<br>collection = {name: &quot;Dave&quot;, age: 37}</pre><p>The other sweet thing I decide was to implement indentation, but it’s space-agnostic. You can use any spacing you like. Also tabs. The only thing is you must close out your block with the SAME indentation you opened with. So the parser sees a new line with 4 spaces. It sees another new line with 8 spaces. It knows that the next time it sees 8 spaces with a xx or an end, that block is closed. Then, when it sees 4 spaces with a xx or an end, that block is closed. And so on.</p><p>I did this because I already had a lot of stuff in the parser that made these choices decidedly NOT a pain in the ass. But also, I think it makes Goblin’s syntax look more distinctive. See:</p><pre>result = <br>    judge<br>        user &gt;&gt; membershp == &quot;premium&quot;:       data.enrich.prioritize.cache<br>        user &gt;&gt; membership == &quot;trial&quot;:        data.basic_clean.rate_limit  <br>        user &gt;&gt; score &lt; 50:     <br>            judge<br>                data.size &gt; 1000: data.throttle<br>                else:             data.process_normally<br>            end<br>        else:                     data.standard_process<br>    end<br><br>/// or the xx style<br>result = <br>    judge<br>        user &gt;&gt; membership == &quot;premium&quot;:       data.enrich.prioritize.cache<br>        user.sift(&quot;trial&quot;):                    data.basic_clean.rate_limit  <br>        user &gt;&gt; score &lt; 50:     <br>            judge<br>                data.size &gt; 1000: data.throttle<br>                else:             data.process_normally<br>            xx<br>        else:                     data.standard_process<br>    xx<br><br>/// sift is a built-in that does what the line above it does, just less verbose</pre><p>I’m not tracking stray curly braces everywhere and the parser will warn me if any of my indentation doesn’t match up (and which line). It’ll also tell me if I’m missing a closing delimiter.</p><p>All in all, I’m quite happy with this setup. I’ll test it out once I’m done with the interpreter. It may turn out to be a pain in the taint. That’s the beauty of it, though. I can always fix something that sucks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3087bed89be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Defending Every Goblin Operator]]></title>
            <link>https://medium.com/@dandonche/defending-every-goblin-operator-05090df153d1?source=rss-6cb0562f1653------2</link>
            <guid isPermaLink="false">https://medium.com/p/05090df153d1</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Daniel Donche Jr.]]></dc:creator>
            <pubDate>Mon, 01 Sep 2025 22:55:11 GMT</pubDate>
            <atom:updated>2025-09-19T17:29:11.198Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m told that the Goblin programming language has a lot of operators. Too many. That it could be confusing to newcomers. Or that the list could be pared down. That I should cull the herd.</p><p>Well, there are 46 of them. According to various sources, this is a lot compared to other languages. “Lua only has…” they say. “Python only has…” Well, let’s take a look at some of Goblin’s colleagues.</p><ul><li><strong>C++</strong>: ~60</li><li><strong>C#</strong>: ~45</li><li><strong>Javascript</strong>: ~40</li><li><strong>Python</strong>: ~35</li><li><strong>Java</strong>: ~40</li><li><strong>Haskell</strong>: ~25</li><li><strong>Ruby</strong>: ~45</li><li><strong>Rust</strong>: ~50</li><li><strong>Lua</strong>: ~20</li><li><strong>Elixir</strong>: ~25</li><li><strong>PHP</strong>: ~50</li><li><strong>Swift</strong>: ~45</li><li><strong>Go</strong>: ~30</li><li><strong>Kotlin</strong>: ~45</li><li><strong>R</strong>: ~30</li></ul><p>Some claim that my use of 46 different operators is a sign of <em>poor design</em>. That it’s shoddy. That Goblin suffers from feature creep. Well I’m here to set the record straight. I’m here to tell you the truth. The straight poop. I’m here to tell you that things are <em>deliberate</em>.</p><p>The truth — the straight poop — is that nobody is actually complaining. Nobody is making claims. But I need a villain or a reason to write this post. I have to stir up controversy. Create some rage. Make you put the Monster energy drink down and shake your fist at something. So we are pretending that people are disparaging Goblin’s perfectly rational and completely amazing set of operators.</p><p>As you can see, 8 out of the list above have fewer operators. 7 are the same or have more. So Goblin is like right in the middle. Goblin is <em>average</em>. Goblin is <em>normal</em>. Goblin is <em>okayish</em>. And there are dozens/hundreds more languages we didn’t even look at.</p><p><strong>Goblin’s 45 Operators:</strong> + - * / % ** // _ ^ &gt;&lt; ++ -- ! %s %o = += -= *= /= %= **= =&gt; &gt;&gt; @ # :: == != === !== !=== &lt; &lt;= &gt; &gt;= &amp; &lt;&gt; &amp;&amp; ?? || | .. ... ?&gt;&gt;</p><p>Looks good to me.</p><h3>Arithmetic Operators</h3><p><strong>Arithmetic (15):</strong> + - * / % ** // _ ^ &gt;&lt; ++ -- ! %s %o</p><p>Let’s start with the first 5. + - * / % are basic mathematical operators. Plus, minus, multiply, divide, modulus. Wonderful. Necessary. Even ++ -- are typical. Increment and decrement. Literally where the C++ name comes from. Hello? Hello world?</p><p>But what the hell are these? ** // &gt;&lt;</p><p>Those are the logical extension of the others. Look:</p><p>+ - * / % family of basic operators. And now: ++ -- ** // &gt;&lt;</p><p>Increment, decrement are normal extensions of + - . So why don’t any languages use ** // ? Seemed weird to me. So I added them. ** is square (power of 2) and // is square root. Easy. Natural extensions of multiply and divide. But what about &gt;&lt; ? WTF is that? It is a natural extension of % modulus. It is the divmod operator. &gt;&lt; unlike modulus gives you both the quotient and the remainder. It is the key to the money type in Goblin, so it gets its own operator.</p><p>It is special. We even have a meme: 10 &gt;&lt; 3 = &quot;safe&quot; which is a reference to being able to safely run $10 / 3 in Goblin.</p><p>Now we come to _ ^ . These are shorthand for floor and ceil. Don’t they <em>look like floor and ceil</em>? Not that I’m going to use these a lot, I just like shorthand shit. Like this little guy ! is the postfix factorial operator. Because that’s literally how you write factorial in math.</p><pre>3.14159_  /// floor, evaluates to 3<br>3.14159^  /// ceil, evaluates to 4<br>5!        /// factorial, evaluates to 120<br><br>//// <br>you can also use regular math ops: <br>.round, .floor, .ceil, .abs, .pow, .sqrt<br>////</pre><p>Now what about %s %o ? What do those mean? This has to do with Goblin’s promotion of %to a first-class percent operator. (There’s a whole white paper I wrote about why this was necessary.)</p><p>For starters, % is overloaded. As an <em>infix</em>, it is modulus (we covered this above). But as <em>postfix</em>, it is the percent operator.</p><pre>/// infix is modulus<br>10 % 3<br><br>/// postfix is percent<br>10% <br>8.5%</pre><p>We don’t need to explain what it means here, there will be other posts specifically for <em>percent</em>. I’ll just say this: because % is its own operator, it became necessary to implement %s %o because, well, just read the white paper.</p><p>Okay, I’ll tell you: % always needs you to tell it “of what” in order to work. By itself, % is programmed to be “of 100”, %s is “percent of self”, and %o is “percent of other”. It all makes sense once you read the white paper, I swear to God.</p><pre>/// By itself, % evaluates to x/100<br>80 * 20%   /// evaluates to 16; i.e. 80 * .20 <br><br>/// Percent of self takes the left operand<br>80 + 25%s  /// evaluates to 100<br><br>/// Percent of other takes what you give it<br>80 + (20%o 100) /// evaluates to 100<br><br>/// why did I do this? Read the white paper. </pre><h3>Assignment Operators</h3><p><strong>Assignment (12):</strong> = += -= *= /= %= **= =&gt; &gt;&gt; @ # ::</p><p>Here we see a selection of stuff that’s in other languages. = += -= *= /= %= **= are mostly typical except for maybe **= .</p><pre>a += 1; is equal to a =  a + 1;<br><br>b -= 1; is equal to b =  b - 1;<br><br>a *= 1; is equal to a =  a * 1;<br><br>b /= 1; is equal to b =  b / 1;</pre><p>The same idea would apply to %= and **= . But what about =&gt; &gt;&gt; @ # :: ? These are simply =&gt; lambda, &gt;&gt; member access (typically a . or -&gt; ), @ is identifying a class (also policies), # identifies private or instance variables, and :: is for accessing namespaces and also used as the separator for classes and objects.</p><p>The only one I’m going to touch on more is &gt;&gt; because “why not just use a dot for member access?” Take a look:</p><pre>user.email       /// why not just use this?<br>user &gt;&gt; email <br>user -&gt; email   </pre><p>I didn’t use the dot because in Goblin, actions (functions/methods) that don’t take arguments may be done without the empty parentheses. math.round() vs math.round . So when you use something like user.email it could very well be user.email() so I just made it simple and said, “dots are only used for callable things in Goblin.” Because I did that, I needed a new member access operator and to be honest, I didn’t like the look of the skinny arrow -&gt; .</p><h3>Comparison Operators</h3><p><strong>Comparison (10):</strong> == != === !== !=== &lt; &lt;= &gt; &gt;= &amp;</p><p>This is where I’m going to lose a lot of you, but I don’t care. I hate how this is done in other languages. In Goblin, I approached this shit in a very simple way. We clearly have == and === . Equal value and strict equality (value and type). We also have ! meaning NOT because it’s a logical operator (see below). Now look at this:</p><pre>// most languages <br>= is assignment <br>== is equality<br><br>// some languages like JS, PHP<br>=== is strict equality<br><br>// now look at the opposites <br>!= is the opposite of ==<br>!== is the opposite of ===</pre><p>I do not like this. Call me fucking crazy, but my thinking was this:</p><pre>// Goblin splits the = family into three clean families:<br><br>= / !=        // assignment state<br><br>== / !==      // value equality<br><br>=== / !===    // strict identity</pre><p>I took each = and just gave it an opposite by adding ! to it. I know, so confusing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*NKp2hyXnPwCrDD7b4dhIWA.jpeg" /></figure><p>Now these ought to be self-explanatory. &lt; &lt;= &gt; &gt;= . But just in case: less than, less than or equal to, greater than, greater than or equal to. Left to right.</p><p>So what about that &amp; there? Well, that’s the “definedness operator.” The&amp; operator tests whether an lvalue path is bound at runtime. It answers the question: <em>“does this variable/member/index exist?”</em></p><h3>Logical Operators</h3><p><strong>Logical (4):</strong> &lt;&gt; &amp;&amp; ?? !</p><p>In order: logical OR, logical AND, nullish, logical NOT. Nullish is the same as it is in lots of other languages.</p><h3>String/Collection Operators</h3><p><strong>String/Collection (5):</strong> || | .. ... ?&gt;&gt;</p><p>First out of this collection of legends are the pipes. String joins. Very simple. || is joing with a space and | is join with no space. I don’t fuck with + “ “ + {some_shit} + “ “ + “some string”. It looks like your mom’s asshole. It’s messy.</p><pre>user_id = &quot;player&quot; | &quot;123&quot;              /// &quot;player123&quot;<br>filename = &quot;save&quot; | &quot;.dat&quot;              /// &quot;save.dat&quot;  <br>full_name = first | &quot;_&quot; | last          /// &quot;Alice_Smith&quot;<br><br>greeting = &quot;Hello&quot; || &quot;world&quot;           /// &quot;Hello world&quot;<br>sentence = &quot;The&quot; || &quot;quick&quot; || &quot;fox&quot;    /// &quot;The quick fox&quot;<br>message = &quot;Welcome&quot; || player_name      /// &quot;Welcome Alice&quot;</pre><p>Real fucking easy. Do I want a space or not? Yes or no?</p><p>.. ... are inclusive range and exclusive range. Again, super easy.</p><pre>/// Numeric ranges<br>for n in 1..5<br>    say n                 /// 1,2,3,4,5 (inclusive)<br>end<br><br>for n in 1...5<br>    say n                 /// 1,2,3,4 (exclusive end)<br>end</pre><p>The ?&gt;&gt; is the <em>optional chaining</em> operator (also called the &quot;safe navigation operator&quot;). It lets you safely access properties or methods on objects that might be null/undefined without throwing an error.</p><pre>// Instead of this (which could crash):<br>user &gt;&gt; address &gt;&gt; street &gt;&gt; name<br><br>// You can write this (which is safe):<br>user ?&gt;&gt; address ?&gt;&gt; street ?&gt;&gt; name</pre><p>And yeah, ?&gt;&gt; is more clunky than ?. which was the original one, but remember, we changed dots to only be for callable actions and shit. I like to keep all the mental shit cleanly organized.</p><p>But there you have it, all 45 of the operators in Goblin. Note that we don’t have bitwise, which we punted to method style. And yeah, I made some changes from what you are probably used to. But the changes I made are sensible to me. They are logical. And I don’t give a fuck about convention. Did you hear that?</p><blockquote>“I don’t give a fuck about convention.” — Dan Donche</blockquote><h3>Update:</h3><p>Since I wrote this I have made some changes. There are other operators.</p><p><strong>Goblin’s Other Operators:</strong> ??=</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=05090df153d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WTF is a Unary Operator?]]></title>
            <link>https://medium.com/@dandonche/wtf-is-a-unary-operator-59005975eeb4?source=rss-6cb0562f1653------2</link>
            <guid isPermaLink="false">https://medium.com/p/59005975eeb4</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Daniel Donche Jr.]]></dc:creator>
            <pubDate>Mon, 01 Sep 2025 17:56:40 GMT</pubDate>
            <atom:updated>2025-09-09T04:51:43.250Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jn88hbL8TY85H4Q5" /><figcaption>Photo by <a href="https://unsplash.com/@nateggrant?utm_source=medium&amp;utm_medium=referral">Nate Grant</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>You can take a hundred online courses, bootcamps, college classes, read dozens of books. Do tutorials. Ask questions and get shit on by neckbeards over at Stack Overflow. But there’s always some terminology that maybe you just never come across.</p><p>Same crap I encountered in English. I read and write English pretty good. Been doing it for a long time. I think I know what I’m talking about. But there will always be a deeper level, reserved for the nerds of any given subject, the “philes” of that thing (bibliophile, oenophile, pedophile, you get the idea). Like, what the fuck is a gerund? A transitive verb? Catachresis? What is a palindrome again? What’s the big deal with this Oxford comma?</p><p>Well, you come across these things when you delve too greedily and too deep inside the mines of whatever subject you’re doing. You awaken something in the darkness.</p><p>That thing in programming languages is the unary operator.</p><p>I’m kidding. I had to tie it all back to the title or else this post would make no fucking sense. But still. What is a unary operator anyway? I’ll tell you. And I’ll tell you some other interesting things I’ve learned along the way (while <a href="https://medium.com/@dandonche/making-my-own-programming-language-fc56967c9f0b">making my own programming language</a>) that, for whatever reason, just never came up before in all the college, books, courses, and tutorials.</p><p>Or maybe I wasn’t paying attention.</p><h3><strong><em>WTF is a unary operator?</em></strong></h3><p>It’s just an operator that is doing something to one thing. As opposed to two things, which is a <strong><em>binary operator</em></strong>. Do I need to know this? Probably not.</p><pre>x++       /// this is a unary operator<br>5!        /// this is a unary operator<br>3.14159_  /// this is a unary operator<br><br>x + 3     /// this is a binary operator<br><br>condition ? value_if_true : value_if_false /// this is a ternary operator</pre><h3><strong><em>WTF is are prefix, infix, and postfix operators?</em></strong></h3><p>This just refers to the position of where the operator is. Before, between, after. Do I need to know this? It is helpful if you’re making your own language. Otherwise? I doubt it.</p><pre>$variable_name    /// the $ here is a prefix operator (this is php)<br>x ** y            /// the ** here is an infix operator (Goblin exponent)<br>3.14159^          /// the ^ here is a postfix operator (Goblin ceiling)</pre><h3>WTF is an operand?</h3><p>An <strong><em>operand</em></strong><em> </em>is just the thing that an operator operates on — the values or variables that the operator works with.</p><pre>5 + 3     /// 5 and 3 are the operands<br>!true     /// true is the operand<br>x &gt;= y    /// x and y are operands</pre><p>This is very much like subject, object and verb type shit in English grammar: Subject-Verb-Object = Operand-Operator-Operand.</p><h3>WTF is an identifier?</h3><p>An identifier is just the name you give things in your code. Variables, functions, classes, that sort of thing. Some identifiers have their own convention or symbol to help you easily pick out what it is.</p><pre>user_name     /// variable identifier<br>$user_name    /// php variable identifier<br>@Class_name   /// class identifier <br>MAX_HEALTH    /// constant variable identifier<br>#private_name /// private variable identifier</pre><h3>WTF is a token?</h3><p>A token is a meaningful unit that the lexer produces from raw text. It’s like breaking a sentence into words, but for code. The lexer reads your source code character by character and groups them into tokens — each token has a type and usually a value.</p><p>Each token is basically saying “I found this type of thing, and here’s what it contains.”</p><pre>IDENTIFIER(&quot;x&quot;)<br>ASSIGNMENT(&quot;=&quot;)<br>NUMBER(&quot;42&quot;)<br>PLUS(&quot;+&quot;)<br>IDENTIFIER(&quot;y&quot;)</pre><p>Common token types:</p><ul><li>IDENTIFIER - variable/function names</li><li>NUMBER - numeric literals</li><li>STRING - string literals</li><li>OPERATOR - +, -, *, etc.</li><li>KEYWORD - if, while, class (if you handle them specially)</li><li>PUNCTUATION - (, ), {, }</li></ul><h3>WTF is a built-in?</h3><p>A built-in is a function, variable, type, or feature that comes pre-loaded with the programming language — you don’t have to import it or define it yourself, it’s just already there.</p><p>Examples:</p><ul><li><strong>Python</strong>: print(), len(), int(), str()</li><li><strong>JavaScript</strong>: console.log(), parseInt(), Array, Object</li><li><strong>C</strong>: printf(), malloc(), strlen() (though technically these are in standard libraries)</li></ul><p>So when you write print(&quot;hello&quot;) in Python, you&#39;re using a built-in function. You didn&#39;t have to write the print function yourself or import it - Python just provides it automatically.</p><h3>WTF is a hard keyword? A soft keyword?</h3><p><strong>Hard keyword</strong>: A word that’s <em>always </em>reserved by the language. You can never use it as an identifier, period.</p><p><strong>Soft keyword</strong>: A word that’s only a keyword in certain contexts. In other contexts, you can still use it as a variable name.</p><p>Examples:</p><p><strong>Hard keywords</strong> (like in most languages):</p><ul><li>if, while, class - you can NEVER name a variable if or while</li><li>The parser always treats these as keywords</li></ul><p><strong>Soft keywords</strong> (context-dependent):</p><ul><li>Python’s match and case (added in Python 3.10) - they&#39;re only keywords inside match statements</li><li>Outside match statements, you can still have match = &quot;tennis&quot;</li><li>C#’s var, where, select - only keywords in LINQ contexts</li><li>Rust’s union - only a keyword when defining unions</li></ul><h3>WTF does shadowable mean?</h3><p>Shadowable means you can define your own thing with the same name, and it “shadows” (hides) the original.</p><p>Example in Python:</p><pre># Built-in function<br>print(&quot;hello&quot;)  # uses built-in print()<br><br># Shadow it<br>print = &quot;I&#39;m not a function anymore&quot;<br><br># Now this breaks - you shadowed the built-in<br>print(&quot;hello&quot;)  # TypeError: &#39;str&#39; object is not callable</pre><p>You “shadowed” the built-in print function with your own variable. This is where knowing what hard keywords are comes into play. These are not shadowable.</p><h3>WTF is a literal?</h3><p>A literal is a value that you write directly in your code — it’s the actual value itself, not a variable that contains a value.</p><p>Examples:</p><ul><li>42 - number literal</li><li>&quot;hello&quot; - string literal</li><li>true - boolean literal</li><li>[1, 2, 3] - array literal</li><li>{name: &quot;Bob&quot;, age: 30} - object literal</li></ul><p>Contrast with variables:</p><pre>let x = 42;        // 42 is a literal<br>let y = x;         // x is a variable (contains the value 42)<br>let name = &quot;Bob&quot;;  // &quot;Bob&quot; is a literal</pre><p><strong>Types of literals:</strong></p><ul><li><strong>Numeric</strong>: 123, 3.14, 0xFF (hex), 0b1010 (binary)</li><li><strong>String</strong>: &quot;text&quot;, &#39;text&#39;, `template`</li><li><strong>Boolean</strong>: true, false</li><li><strong>Null/undefined</strong>: null, undefined, nil</li></ul><p>These are just a few of the things I’ve encountered that I either ignored because it didn’t matter for what I was doing, or they never got mentioned. But since I’ve started making Goblin, these things have come up from the depths of Moria. There’s a ton of other shit you have to take into consideration. What goes into the lexer? What can you keep out of the lexer and push to the parser? What will you do about memory management? What goes into core vs what can you put into extensions later? Are you going to make an interpreter, a VM, a compiler? Do you want your language to be embeddable? What language will you build this out of? Python? Go? Rust? Why did your parents move and not give your their new address?</p><p>So many questions.</p><p><a href="https://medium.com/@dandonche/making-my-own-programming-language-fc56967c9f0b">Making My Own Programming Language</a></p><p>It’s all a part of doing something new. You think you know a thing, or maybe you thought you at least had a decent grasp of a thing, only to find out there is way more to it than you could have imagined. It’s easy to get overwhelmed. It’s easy to think that you might get it wrong and that people will make fun of you later for decisions you made.</p><p>But here’s the secret: you’re not going to get everything right. You’re going to make mistakes. That’s fine. You can fix them. You’re not going to please every neckbeard. You don’t have to. Let them complain. Let them make their own language if they’re so smart. They won’t have time to criticize anymore, I can tell you that. The people who criticize the most are the ones who aren’t busy doing their own shit.</p><p>So go do your own shit. And good luck to you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59005975eeb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Syntax Whack-a-Mole]]></title>
            <link>https://medium.com/@dandonche/syntax-whack-a-mole-63037a0857c3?source=rss-6cb0562f1653------2</link>
            <guid isPermaLink="false">https://medium.com/p/63037a0857c3</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Daniel Donche Jr.]]></dc:creator>
            <pubDate>Sat, 30 Aug 2025 04:38:38 GMT</pubDate>
            <atom:updated>2025-09-22T04:49:00.747Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aXwL8QG99hzGJfiF" /><figcaption>Photo by <a href="https://unsplash.com/@florianolv?utm_source=medium&amp;utm_medium=referral">Florian Olivo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This is part two of my infinity-part series on creating my own programming language. I’m basically going to document this experience in such a way as to describe as accurately as possible the excruciating pain and unfettered terror that are inherent in such an undertaking. So you can make your own informed decision — should you ever decide to follow in my idiotic footsteps — on whether you should endure such a pestiferous nightmare yourself or stay the fuck away.</p><p><a href="https://medium.com/@dandonche/making-my-own-programming-language-fc56967c9f0b">Making My Own Programming Language</a></p><p>I’m going to be straight with you. If you can’t be assed to read the above post, it basically says that I don’t know what I’m doing. So bear that in mind. Do you understand me? <em>I don’t know what I’m doing.</em></p><p>With making a new programming language, with understanding an old programming language, with programming itself, with anything. With writing blogs. I just don’t know about any of it.</p><p>So I just started. I basically said, “What are the minimum things I’ll need?” Variables, loops, conditionals, strings, operators, comments, all that happy horse shit. I make a list. And then I get started. And my process is this:</p><ol><li>look at the item on the list.</li><li>look at how other languages do the items on the list.</li><li>ask myself how I would like the item on the list to be done.</li></ol><p>I tell myself there are no rules here. No conventions. No protocols. What I want is what will come to pass.</p><p>Ha.</p><p>I design the comment system. In-line and block. I want them to be the same. So not like # for inline and some other symbol for blocks. And I know I don’t want to use /* and */ because I can NEVER remember what order they go in. No. No sir or ma’am. For my language, these things will be the <em>same</em>. I decide I like the way /// and //// looks. I tried a bunch.</p><pre>/// This explains what the next line does<br>health = 100  /// Or explain why you chose this value<br><br>////<br>This is a multi-line block comment.<br>You can write as much as you want here.<br>Great for explaining complex algorithms<br>or leaving notes for your future self.<br>////</pre><p>I don’t want to use // for comments because I am going to be using // in math operations. I want my language to be clear and expressive. But I decide to tackle the next headache that always pissed me off: string joins.</p><p>I hate the way string concatenation and joining works, pretty much across the board. I decide I’m going to do things differently. I’m going to use pipes. | and || specifically. One pipe means no space and two pipes gives you a space between. Easy, right?</p><pre>user_id = &quot;player&quot; | &quot;123&quot;              /// &quot;player123&quot;<br>filename = &quot;save&quot; | &quot;.dat&quot;              /// &quot;save.dat&quot;  <br>full_name = first | &quot;_&quot; | last          /// &quot;Alice_Smith&quot;<br><br>greeting = &quot;Hello&quot; || &quot;world&quot;           /// &quot;Hello world&quot;<br>sentence = &quot;The&quot; || &quot;quick&quot; || &quot;fox&quot;    /// &quot;The quick fox&quot;<br>message = &quot;Welcome&quot; || player_name      /// &quot;Welcome Alice&quot;</pre><p>Hell yeah. I love it. I’m locking it in. I leave it in. I do this method for pretty much all the shit. I’m starting to have lots of fun just planning out the syntax. But eventually we come around to &amp;&amp;, ||, and !. And, OR, Not. I can’t use || for OR now because it’s already taken. Shit. Shit fuck. So I fiddle. I come up with &lt;&gt; for OR. I’m cool with it. It means something in SQL but I don’t care. Moving on.</p><p>But wait. (Much later, I realized I needed that pipe for objects and classes, so I made the switch to use + like a normal human for string joins. No, I cannot make up my mind. Yes, I did keep the “with space” option.</p><pre>user_id = &quot;player&quot; + &quot;123&quot;              /// &quot;player123&quot;<br>filename = &quot;save&quot; + &quot;.dat&quot;              /// &quot;save.dat&quot;  <br>full_name = first + &quot;_&quot; + last          /// &quot;Alice_Smith&quot;<br><br>greeting = &quot;Hello&quot; ++ &quot;world&quot;           /// &quot;Hello world&quot;<br>sentence = &quot;The&quot; ++ &quot;quick&quot; ++ &quot;fox&quot;    /// &quot;The quick fox&quot;<br>message = &quot;Welcome&quot; ++ player_name      /// &quot;Welcome Alice&quot;<br><br>/// if you hate ++ just manually add your spaces like a heathen<br>greeting = &quot;Hello&quot; + &quot; world&quot;           /// &quot;Hello world&quot;<br>sentence = &quot;The&quot; + &quot; quick&quot; + &quot; fox&quot;    /// &quot;The quick fox&quot;<br>message = &quot;Welcome &quot; + player_name</pre><p>The more I do this, though, the more I realize that earlier design decisions are causing me to refactor a bunch of shit. For example, another design decision I made upfront was that I’d make empty parentheses on method calls optional. If a method doesn’t take any arguments, you can leave that off. This is so I can do chaining more cleanly:</p><pre>/// Chaining multiple operations flows naturally left-to-right<br>messy_input = &quot;  HELLO world  &quot;<br>clean_output = messy_input.trim.lower.title    /// &quot;Hello World&quot;<br><br>/// You can also do prefix actions instead<br>clean_output = trim lower title &quot;  HELLO world  &quot;<br><br>/// Instead of<br>clean_output = messy_input.trim().lower().title()</pre><p>I lock this decision in. But later on, I realize that now I run into situations where I’m checking member fields for objects in classes and I can’t tell if it’s a field value or a method or what.</p><pre>player.is_active<br>status.pending<br>user.banned <br><br>/// are these methods? values? What are they?</pre><p>So now I want to change it so that I can keep leaving off empty parentheses for argument-less methods (which I’ve also decided to call “actions” instead because I’m making it so we don’t have separate words for “functions” and “methods”). So I revisit how I do this with objects. I try a bunch of options, settle on:</p><pre>player-&gt;is_active<br>status-&gt;pending<br>user-&gt;banned</pre><p>I like it. Great. Fantastic. But now that I’ve started using -&gt; for this, I now need to change how I do lambda. Because until now, lamda is -&gt;. So I have to change lambda to fat arrow instead of skinny arrow. =&gt;</p><p>But I like how I’m using skinny arrow now. It’s suggestive. It’s intuitive, just like my pipe joins.</p><pre>@Player = name: &quot;{name}&quot; :: health: 100 :: level: 1 /// @ is declaring a class<br>    action level_up() = level = level + 1 /// level_up alternative<br>end<br><br>player = Player: &quot;Alice&quot; :: :: 2 /// You can skip over default values with :: <br>say Player-&gt;name /// say instead of print; returns &quot;Alice&quot;<br>counter = 0<br>PI = 3.14159 /// constants are uppercase by convention</pre><p>But wait! After seeing -&gt; along with a bunch of pipeline operators |&gt; in snippets, I decide that we are going to use &gt;&gt; instead. Which is my current divmod operator (because I wanted a fucking divmod operator). So now I had to switch divmod to &gt;&lt; instead.</p><pre>@Player = name: &quot;{name}&quot; :: health: 100 :: level: 1 <br>    action level_up() = level = level + 1 <br>end<br><br>player = Player: &quot;Alice&quot; :: :: 2 <br>say Player &gt;&gt; name <br>counter = 0<br>PI = 3.14159 <br><br>/// and now I show you a Goblin meme. old:<br>10 &gt;&gt; 3 = &quot;safe&quot;<br><br>/// new; it even looks like a meme<br>10 &gt;&lt; 3 = &quot;safe&quot; </pre><p>This is after me already refactoring how to instantiate classes and how I’m doing functions.</p><pre>/// initially used init for classes<br>init Player = name: &quot;{name}&quot; ...<br><br>/// switched to using class instead of init<br>class Player = name: &quot;{name}&quot; ...<br><br>/// settled on @ for naming classes<br>@Player = name: &quot;{name}&quot;<br><br>/// also using # for private objects and actions in a class<br>#player1 = Player: &quot;Gandolf&quot; ...<br><br>/// started out using functions like normal<br>fn add_health(amount)<br>    <br>/// changed to calling functions and methods &quot;operations&quot;<br>op add_health(amount)<br><br>/// changed to calling them actions instead<br>action add_health(amount) /// act aliased <br>act add_health(amount) /// if you&#39;re into the whole brevity thing</pre><p>Anyway, as you can see, changing one thing in one place forces you to change something in another place, which sets off a nuclear chain reaction causing you to refactor just about everything else. But that’s okay. Keep iterating until you get everything how you want. For fun, here’s another block showing how we do classes and objects.</p><pre>/// Define the class<br>@Card = name: &quot;{name}&quot; :: price: $0.99 :: qty: 1<br><br>/// Create object instances in a map<br>Deviant_Moon = {<br>    major_arcana: [<br>        fool = Card: &quot;Fool&quot;<br>        magician = Card: &quot;Magician&quot; :: $2.00<br>        high_priestess = @card: &quot;High Priestess&quot; :: $1.50 :: nc<br>    ]<br>    cups: [<br>        ace_c = Card: &quot;Ace of Cups&quot; :: ...<br>        two_c = Card: &quot;Two of Cups&quot; :: :: 3<br>        three_c = Card: &quot;Three of Cups&quot; :: ...<br>    ]<br>    // ...other suits<br>}</pre><p>I did it this way so I can set the template for the card object with defaults and interpolation for parts that require a value (name). Then, what I did was allow you to skip default values by using :: as a placeholder (Two of Cups has default price, but changed the qty). You can also use “nc” (no change) instead of :: in case you have lots of :: :: :: :: in a row. Lastly, if everything else is skipped, you can put :: … to signify that.</p><p>But do you remember how we got rid of the pipe for string joins because I said we needed it for objects and classes? Yeah. So here what that looks like now:</p><pre>@Pet = name: &quot;{name}&quot; :: age: 0 :: species: &quot;dog&quot;<br>    act speak() = &quot;Woof! I&#39;m {name}!&quot;<br>end<br><br>fluffy|Pet = name: &quot;Fluffy&quot; :: age: 3 :: species: &quot;cat&quot;<br>buddy|Pet = name: &quot;Buddy&quot; :: age: 2<br>max|Pet = name: &quot;Max&quot; :: :: species: &quot;cat&quot;</pre><h3>Conclusion</h3><p>Anyway, my point for all of this is that you will be making decisions, tradeoffs, and refactoring <em>a fuckton</em> if you ever decide to do this. But it’s a good thing. Just by doing this, you realize that the people before you have also had to go through the same exact thing. Then you don’t feel so bad. You also learn a lot about programming in general. Like, you learn about unary operators, postfix vs infix, tokens, identifiers, scope, etc.</p><p>And maybe you don’t want to go through the hassle. But if you do, keep going. You’ll get there. And it’s badass when it all starts to come together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63037a0857c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>