Skip to content

abneeshsingh21/EPL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

366 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

EPL β€” English Programming Language

Write code the way you think. In plain English.


PyPI Downloads Python License VS Code Stars Sponsor


EPL is a fully-featured programming language where every keyword is natural English.
Build web apps, REST APIs, mobile apps, AI pipelines, and cloud-native services β€”
in a syntax anyone can read, write, and maintain.


pip install eplang

Website Β Β·Β  Documentation Β Β·Β  Playground Β Β·Β  VS Code Β Β·Β  Packages



Overview

EPL (English Programming Language) eliminates the gap between pseudocode and executable code. Its syntax reads like structured English, while its runtime delivers the performance and tooling expected from a modern language β€” bytecode VM, LLVM native compilation, WASM targets, and a 22-package official ecosystem.

Note: A production-grade REST API in EPL

Create WebApp called app

Route "/api/users" responds with
    users = [Map with name = "Alice" and role = "admin", Map with name = "Bob" and role = "user"]
    Send json Map with data = users and count = length(users) and status = "ok"
End

Route "/health" responds with
    Send json Map with status = "healthy" and version = "10.1.0"
End

No semicolons. No curly braces. No cryptic symbols. Just English.


Quick Start

Install

pip install eplang

Run

echo 'Say "Hello from EPL!"' > hello.epl
epl hello.epl

REPL

epl repl

Scaffold a Project

epl new myapp --template web        # Web app with routing
epl new authapp --template auth     # Auth API with JWT
epl new botapp --template chatbot   # AI chatbot
epl new studio --template frontend  # Creative frontend

Production Deployment

pip install "eplang[server]"
epl serve app.epl                    # Dev server
epl deploy k8s app.epl --image myapp:1.0 --tls  # Kubernetes
epl deploy aws app.epl               # AWS ECS

EPL supports WSGI (Waitress, Gunicorn) and ASGI (Uvicorn, Hypercorn) deployment through generated adapters and the epl serve runtime.

Security, CSP & the Escape Hatch

The web DSL renders structure, styling (Style/Stylesheet), head/SEO (Head), and interactivity (On click/hover/reveal) as native, server-rendered output β€” no client-side injection. Event handlers compile to a generated <script> (never inline on* attributes).

For the imperative cases the DSL doesn't model β€” a canvas particle engine, custom requestAnimationFrame loops, third-party widgets β€” Script, Raw HTML, and Stylesheet are the sanctioned, author-responsible escape hatches (the canvas particle engine on the EPL site itself lives in a Script block by design). Their bodies are emitted verbatim, with breakout guards on Stylesheet.

Run under a strict Content-Security-Policy with --csp:

epl serve app.epl --csp

This generates a fresh per-response nonce, tags every generated <script> with it, and sends Content-Security-Policy: … script-src 'self' 'nonce-…' … β€” so the generated JS runs under a strict policy with no 'unsafe-inline' for scripts. (Programmatic equivalent: configure_page(csp=True).)


Language at a Glance

Variables & Control Flow

name = "Abneesh"
age = 20
scores = [95, 87, 92]

If age is greater than 18 then
    Say "Welcome, " + name
Otherwise
    Say "Access denied"
End

For Each score in scores
    Say score
End

Repeat 3 times
    Say "Iteration complete"
End

Functions & OOP

Function fibonacci takes n
    If n is less than 2 then
        Return n
    End
    Return fibonacci(n - 1) + fibonacci(n - 2)
End

Class User has name, email, role
    Method display
        Say "User: " + this.name
    End
End

user = new User("Ada", "ada@epl.dev", "admin")
user.display()

Architecture

EPL is a multi-backend language with a unified frontend:

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   .epl source  ──▢│    Lexer      β”‚
                    β”‚    Parser     β”‚
                    β”‚    AST        β”‚
                    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β–Ό            β–Ό                β–Ό
     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β”‚  Interpreter β”‚ β”‚ Bytecode β”‚  β”‚    LLVM      β”‚
     β”‚  (Tree-walk) β”‚ β”‚ VM       β”‚  β”‚  (Native)    β”‚
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚            β”‚                β”‚
              β–Ό            β–Ό                β–Ό
         Python host   Stack VM       .exe / .o
                                    (x86-64 verified)

Compilation Targets

Target Command Output
Bytecode VM (default) epl run app.epl Stack-based VM
Interpreter epl run --interpret app.epl Tree-walk
Native Binary epl build app.epl LLVM β†’ .exe / ELF
WebAssembly epl wasm app.epl .wasm module
JavaScript epl js app.epl Browser/Node.js
Kotlin epl kotlin app.epl JVM / Android
Python epl python app.epl .py transpile

The interpreter and bytecode VM are held to byte-for-byte output parity by a dedicated harness (tests/parity_check.py) that diffs every example across both backends β€” so epl run and epl run --interpret behave identically.


Ecosystem

Official Package Registry β€” 22 Packages

EPL ships with a curated package ecosystem covering web, data, AI, security, and infrastructure:

CategoryPackagesDescription
Web & APIepl-web Β· epl-httpHTTP router, WebSocket, REST client, middleware
Data & DBepl-db Β· epl-dataframe Β· epl-collectionsSQLite ORM, DataFrame ops, typed collections
AI & MLepl-learn Β· epl-array Β· epl-plotScikit-learn bindings, NumPy arrays, Matplotlib charts
Math & Scienceepl-math Β· epl-science Β· epl-algoNumber theory, SciPy integration, graph algorithms
Securityepl-auth Β· epl-crypto Β· epl-validatorJWT auth, hashing/encryption, input validation
Infrastructureepl-cloud Β· epl-cache Β· epl-emailAWS/GCP/Azure, Redis caching, SMTP
Languageepl-string Β· epl-datetime Β· epl-functional Β· epl-structString utils, date ops, FP patterns, typed records
Testingepl-testUnit testing framework with assertions
epl install epl-auth         # Install a package
epl install epl-math         # Packages resolve from the official registry

Browse all packages at the EPL Package Registry β†’

Standard Library β€” 21 Modules

Built-in modules available without installation: math, string, http, json, crypto, datetime, regex, io, os, sql, net, html, web, websocket, collections, encoding, functional, auth, template, testing, sql.

JavaScript/TypeScript Bridge

Access the entire NPM ecosystem from EPL:

Use javascript "lodash" as _
Use javascript "axios" as axios

result = _.chunk([1, 2, 3, 4, 5, 6], 2)
response = axios.get("https://api.example.com/data")
Say response.data

What Can You Build

🌐 Web Applications & APIs

Create WebApp called app

Route "/api/users" responds with
    users = query(db, "SELECT * FROM users")
    Send json Map with data = users
End

πŸ€– AI & Machine Learning

Import "epl.ai" As ai
messages = [Map with role = "user" and content = "Explain EPL"]
response = ai.chat(messages)
Say response

πŸ—„οΈ Database Applications

Import "epl-db"
db = open("app.db")
create_table(db, "tasks", Map with title = "TEXT" and done = "INT")
insert(db, "tasks", Map with title = "Ship EPL" and done = 0)

πŸ“± Android Apps

epl android app.epl
# β†’ Full Android Studio project with Kotlin

The generated Kotlin/Gradle project is compiler-verified: it builds an installable debug APK via gradlew assembleDebug, with a bundled EPLRuntime providing db_* (SQLite) and file_* (sandboxed storage) support.

🍎 iOS Apps (experimental)

epl ios app.epl
# β†’ Xcode project with SwiftUI views

The iOS/SwiftUI generator emits an Xcode project, but the output is not yet verified against a Swift toolchain or a device/simulator in CI. Treat it as experimental until that validation lands.

πŸ–₯️ Desktop Apps

epl desktop app.epl
# β†’ Compose Multiplatform desktop app

⚑ Native Executables

epl build app.epl
# β†’ LLVM-compiled native binary

Requires an LLVM/clang toolchain. The native backend compiles type-annotated programs (e.g. takes integer a and returns integer) and, as of v10.1.0, also infers types for untyped functions when every parameter and return collapses to a single concrete type across the program's call sites β€” so many previously-refused programs now build. Genuinely dynamic or polymorphic functions are still refused with a clear message rather than miscompiled β€” run those with epl run, which supports the full dynamic language.

☸️ Kubernetes Deployment

epl deploy k8s app.epl \
  --image myapp:1.0 \
  --host app.example.com --tls

Feature Matrix

Category Capabilities
Language OOP, generics, async/await, pattern matching, lambdas & closures (capturing lambdas, executed on both the interpreter and the bytecode VM), generators, enums, decorators, type inference
Type System Static type checker (epl check), gradual typing, generic constraints, whole-program type inference for native builds (untyped functions that resolve to a single concrete type compile without annotations)
Performance Bytecode VM with constant folding, LLVM native compilation, dead code elimination, tail-call optimization
Web HTTP/WebSocket router, WSGI/ASGI adapters, middleware pipeline, sessions, templates, static files
Database SQLite ORM, Redis, PostgreSQL β€” Store/Fetch/Delete English APIs
Security Sandboxed FFI, pickle allowlist, recursion/scope-depth limits, input validation
Tooling LSP server, REPL, debugger, formatter (epl fmt), linter (epl lint), test runner, code coverage
Targets Interpreter, VM, LLVM native, JS, Kotlin, Python, WASM, MicroPython β€” 8 compilation backends
Packaging SemVer registry, lockfiles, checksums, dependency resolution, PyPI bridge
AI Built-in ai module, Error Explainer v2.0 with 55+ offline patterns (epl fix), auto-fix (--fix), dual-model copilot
DevOps K8s manifests, AWS/GCP/Azure deploy, Prometheus metrics, health endpoints, structured logging
Interop JS/TS bridge for NPM, Python bridge for PyPI, persistent Node.js subprocess
Stdlib 725+ built-in functions: HTTP, DB, Math, Crypto, File I/O, JSON, Regex, DateTime, HTML

CLI Reference

Usage: epl <command> [options]

Core
  epl run <file>              Run an EPL program
  epl repl                    Interactive REPL
  epl new <name> [--template] Scaffold a new project
  epl serve <file>            Start web server (dev mode)

Build & Compile
  epl build <file>            Compile to native executable (LLVM)
  epl wasm <file>             Compile to WebAssembly
  epl js <file>               Transpile to JavaScript
  epl python <file>           Transpile to Python
  epl kotlin <file>           Transpile to Kotlin

Platform Targets
  epl android <file>          Generate Android Studio project
  epl ios <file>              Generate Xcode / SwiftUI project
  epl desktop <file>          Generate Compose Multiplatform app
  epl web <file>              Generate WASM/JS web app

Quality & Tooling
  epl check [file]            Static type checking
  epl fmt <file>              Format source code
  epl lint [file]             Lint source code
  epl test [dir]              Run test suite
  epl fix <file>              Error diagnostics (offline, 55+ patterns)
  epl fix <file> --fix        Auto-apply suggested corrections

Deploy
  epl deploy k8s <file>       Generate Kubernetes manifests
  epl deploy aws <file>       Deploy to AWS ECS
  epl deploy gcp <file>       Deploy to GCP Cloud Run
  epl deploy azure <file>     Deploy to Azure Container Apps

Packages
  epl install <package>       Install a package
  epl upgrade                 Upgrade EPL to latest version

Tools
  epl playground              Browser-based playground
  epl copilot                 AI code assistant

Comparison

Capability EPL Python JavaScript Go Java
Natural-language syntax βœ… β€” β€” β€” β€”
Learning curve Minutes Days Days Weeks Weeks
Built-in web framework βœ… β€” β€” β€” β€”
Built-in AI module βœ… β€” β€” β€” β€”
Package manager βœ… pip npm go mod Maven
Native compilation βœ… LLVM † β€” β€” βœ… βœ… JIT
WASM target πŸ§ͺ ‑ β€” βœ… βœ… β€”
Mobile transpiler βœ… Android Β· πŸ§ͺ iOS ‑ β€” React Native β€” βœ…
LSP / IDE support βœ… βœ… βœ… βœ… βœ…
Type checking βœ… Gradual βœ… mypy βœ… TS βœ… βœ…

† Native (epl build) compiles type-annotated programs and infers types for untyped functions where they resolve to a single concrete type (v10.1.0); genuinely dynamic/polymorphic functions are safely refused (run them with epl run). πŸ§ͺ ‑ = experimental / not yet CI-verified against the target toolchain (Emscripten for WASM, Swift for iOS).


VS Code Extension

The official EPL extension provides a first-class development experience:

  • Syntax Highlighting β€” Full TextMate grammar for .epl files
  • Real-time Diagnostics β€” Type errors, unused variables, parse errors
  • IntelliSense β€” Autocomplete for keywords, builtins, and imports
  • Hover Documentation β€” Inline docs for all 725+ built-in functions
  • Error Diagnostics β€” epl fix with Rust-style context window and --fix auto-correction
  • Run & Check β€” Ctrl+Shift+R to run, Ctrl+Shift+K to type-check

Install from the VS Code Marketplace β†’


Documentation

Resource Link
Getting Started docs/getting-started.md
Language Specification docs/language-spec.md
Tutorials docs/tutorials.md
Package Manager Guide docs/package-manager.md
Architecture Overview docs/architecture.md
Publishing Packages docs/publishing.md
Full Documentation Site abneeshsingh21.github.io/EPL
Changelog CHANGELOG.md

Contributing

We welcome contributions from the community. EPL maintains enterprise-grade code quality standards: every change is gated by a single consolidated, blocking CI pipeline β€” Ruff lint + formatting, whole-tree mypy type-checking, an enforced coverage floor, dependency-review, and the full test suite (2,100+ tests) run across Linux/Windows/macOS Γ— Python 3.9–3.12. Releases publish to PyPI via tag-triggered OIDC trusted publishing (no stored tokens).

git clone https://github.com/abneeshsingh21/EPL.git
cd EPL
pip install -e ".[dev,cloud]"
ruff format .
pytest tests/ -x --tb=short -q

Before contributing, please read:

See CONTRIBUTORS.md for the full list of contributors.


Roadmap

  • Core language β€” interpreter, bytecode VM, LLVM native compiler
  • Web framework β€” HTTP/WebSocket router, WSGI/ASGI, middleware
  • Package manager β€” SemVer, lockfiles, checksums, dependency resolution
  • Developer tooling β€” LSP server, debugger, REPL, formatter, linter
  • Mobile targets β€” Android (Kotlin) transpiler Β· iOS (SwiftUI) generator (experimental, not yet toolchain-verified)
  • Desktop target β€” Compose Multiplatform app generation
  • Cloud deploy β€” AWS ECS, GCP Cloud Run, Azure, Kubernetes
  • JavaScript/TypeScript bridge β€” Full NPM ecosystem interop
  • AI integration β€” Built-in module, Error Explainer v2.0 (55+ offline patterns, auto-fix), copilot
  • Observability β€” Health checks, Prometheus metrics, structured logging
  • PyPI distribution β€” pip install eplang
  • VS Code extension β€” Syntax, diagnostics, IntelliSense
  • Official documentation site and browser playground
  • 22 official packages across web, data, AI, security, and infrastructure
  • Language server protocol v2 (semantic tokens, token-aware rename & references)
  • WebSocket real-time collaboration
  • GPU compute target (CUDA/ROCm via LLVM)

Community


Sponsor

EPL is built and maintained by Abneesh Singh as an independent open-source project. If EPL is useful to you β€” in education, prototyping, or production β€” consider sponsoring its development:

Your sponsorship directly funds: new language features, official packages, documentation, VS Code extension updates, and security patches.


License

Copyright Β© 2024–2026 Abneesh Singh (contact@eplang.me)

Licensed under the Apache License 2.0. See NOTICE for attribution requirements.

"EPL" and "English Programming Language" are trademarks of Abneesh Singh.


⭐ If EPL resonates with you, consider starring the repository.

Made with precision by Abneesh Singh

Packages

 
 
 

Contributors

Languages