Skip to content

ShellLite/shlcpp

Repository files navigation

ShellLite (C++ Runtime)

Warning

Release Candidate (v0.1.0): This native C++ runtime is an alpha/preview release. It implements the core GBP architecture and standard library, but you may encounter bugs. Please report any issues!

A Natural Language Programming System

ShellLite is a high level programming language designed to bridge the gap between natural language and executable code. It prioritizes readability without sacrificing the power of a modern general purpose language.

Technical Foundation

The project implements Geometric Binding Parsing (GBP), an algorithm that decouples topographic structure (indentation geometry) from code semantics, allowing for a flexible, indentation sensitive syntax that feels natural to read and write.

Key Features

  • Natural Language Syntax: Designed to be read like plain English or pseudocode, reducing the cognitive load for beginners.
  • Asynchronous Web Capabilities: Built in multi threaded HTTP event loop for native web server handling.
  • Built in Standard Library: Robust native libraries for I/O, File System, JSON, CSV, and SQLite Database operations.

Quick Start

Installation

ShellLite is natively compiled using CMake. We provide simple install scripts to compile and globally install the shlcpp binary on your system.

Windows (PowerShell):

.\compile_shl.bat
.\install.ps1

Linux / macOS (Bash):

./install.sh

Hello World

say "Hello, World!"

name = ask "What is your name? "
say "Welcome to ShellLite, " + name

Number Guessing Game Example

use "random"

say "=== Number Guessing Game ==="
say "I'm thinking of a number between 1 and 100."

secret = randint(1, 100)
attempts = 0
max_attempts = 7

while attempts < max_attempts
    remaining = max_attempts - attempts
    say "\nAttempts remaining: " + str(remaining)
    
    guess = int(ask "Your guess: ")
    attempts = attempts + 1
    
    if guess == secret
        say "\nCongratulations! You got it in " + str(attempts) + " attempts!"
        stop
    elif guess < secret
        say "Too low!"
    else
        say "Too high!"

say "\nGame Over! The number was " + str(secret)

Running Code

Once installed, you can run .shl scripts globally from any terminal:

shlcpp script.shl

View compiler version and help:

shlcpp --version
shlcpp --help

Research & Documentation

For a deep dive into the underlying parsing theory, please refer to the papers on Zenodo By CERN:

Official Discord

License

GNU GPL V3 With Class Exception License - See LICENSE for details.

About

The native C++ implementation of the ShellLite programming language.

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors