Hacker News Viewer

G Lang – A lightweight interpreter written in D (2.4MB)

by pouyathe on 1/30/2026, 1:56:04 PM

Hi HN,<p>I&#x27;ve been working on a programming language called G. It is designed to be memory-safe and extremely fast, with a focus on a tiny footprint.<p>The entire interpreter is written in D and weighs in at only 2.4MB. I built it because I wanted a modern scripting language that feels lightweight but has the safety of a high-level language.<p>Key Features:<p><pre><code> Small: The binary is ~2.4MB. Fast: Optimized for x86_64. Safe: Memory-safe execution. Std Lib: Includes std.echo, std.newline, etc. </code></pre> GitHub: https:&#x2F;&#x2F;github.com&#x2F;pouyathe&#x2F;glang<p>I would love to get some feedback on the syntax or the architecture from the community!

Comments

by: olivia-banks

I think this is a really cool project! The syntax here is interesting. I was wondering if you could shed some light on it, I wasn&#x27;t able to find what `[@] : ` or `[%] : ` meant.<p>Also, can I ask why the source code for the interpreter looks like that? This is an honest question. I thought it might have been machine generated (via a sort of self-hosting G transpiler) but the comments at the top dissuade me from this view.

2/3/2026, 4:51:45 AM


by: pouyathe

<p><pre><code> &quot;Update: Wow, this got a second life! Seeing a spike in GitHub clones (328+ in 2 days). If anyone&#x27;s trying G, I&#x27;d love to hear: What&#x27;s your use case? What&#x27;s the biggest hurdle you faced? What feature would make G actually useful for you? Thanks for checking it out! — A 17yo student building this.&quot;</code></pre>

2/1/2026, 6:42:38 PM