.g Language Version History

v2.0.5 Stable July 01, 2025
  • Minor bug fixes and interpreter stability improvements
  • Finalized loop control keywords: break, continue
  • Improved switch-case logic evaluation
  • Enhanced internal error tracing
v2.0.0 Major June 21, 2025
  • First stable release of v2.x series
  • New keywords: type, des, for, times, until, do-until
  • Added switch/case support
  • Added REPL with tab completion
  • Implemented ternary expressions: cond ? a : b
  • Introduced structured error handling system
  • Complete standard library documentation
  • Improved Windows compatibility in CLI
  • Improved VS Code extension with debugger support
v1.0.2 Patch June 12, 2025
  • Bug fixes and syntax parser tweaks
  • Improved error handling messages (still in progress)
v1.0.0 Stable June 10, 2025
  • Initial release of .g language
  • Core syntax: var, say, if, else, while, function, return, try, catch
  • Basic interpreter and REPL engine

.g language

A minimalist systems programming language with clean syntax and powerful abstractions.

Installation

Install the .g compiler and CLI tool globally via npm:

npm install -g @singhgurjot/g-lang

Verify the installation:

g --version
Download for Other Platforms (soon)

Getting Started

Running .g files

Create a file with .g extension and run it with:

g run filename.g

VS Code Extension

Run .g Files in VS Code

The official G Runner extension adds a Run button and keyboard shortcut to run .g files directly inside Visual Studio Code.

  • One-click execution
  • Syntax highlighting
  • Keyboard shortcut: Ctrl + Alt + R
Install on VS Code Marketplace Version

Standard Library

The std@1.0 library comes with essential modules:

// Import standard library modules import io from std@1.0 import math from std@1.0
Download Handbook (PDF) Handbook (DOCX)

File Icon Theme

Glowing .g Icon in VS Code

Add a fire-glowing identity to your .g files with the G Icons extension. Instantly recognizable in your sidebar — built to match the spirit of Project Grey.

.g
Install G Icons on VS Code

Also available from the Visual Studio Marketplace.

Core Features

Simple Syntax

No semicolons, no bloat. Just pure logic in readable lines.

Built-in CLI Tools

Create, run, and chain scripts easily with the g CLI.

Standard Library

Modular standard library with file I/O, math, strings, and HTTP support.

Error Handling

Use try/catch for runtime errors. Debug smarter, not harder.

Array & Object Support

Work with structured data like arrays and objects easily.

Cross-Platform

Install once. Run anywhere. Powered by Node.js and JavaScript.

Made with .g

Small projects and tools built with .g language

File Organizer
// Organize files by extension
import fs from std@1.0
import path from std@1.0

for file in fs.readDir(".") {
    if path.isFile(file) {
        ext = path.extname(file)
        fs.mkdir(ext) unless fs.exists(ext)
        fs.move(file, path.join(ext, file))
    }
}
Web Server
// Simple HTTP server
import net from std@1.0

server = net.createServer(req, res) {
    res.writeHead(200)
    res.end("Hello from .g!")
}

server.listen(8080)
CLI Calculator
// Command-line calculator
import math from std@1.0
import io from std@1.0

args = cli.args
if args.length != 3 {
    say "Usage: calc num op num"
    cli.exit(1)
}

a = args[0].toNumber()
op = args[1]
b = args[2].toNumber()

result = match op {
    "+" => a + b
    "-" => a - b
    // ... other ops
}

say result