
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
when-lang
Advanced tools
A unique loop-based programming language where everything runs in implicit loops with conditional execution.
main: runs continuouslyos name(): - One Shot (run once when called)de name(n): - Declarative (run exactly n times)fo name(): - Forever (run until stopped)when condition: for reactive programming.start() and .stop() for managing executiondef# Clone or download the WHEN interpreter
git clone https://github.com/PhialsBasement/WHEN-Language.git
cd WHEN-Language
# Run WHEN programs
python when.py program.when
# Install globally with pip
pip install -e .
pip install when-lang
# Now use the 'when' command
when program.when
# Copy when.bat to a directory in your PATH, or add the whenloop directory to PATH
when program.when
# Make the script executable and copy to PATH
chmod +x when
cp when /usr/local/bin/
# Or add the whenloop directory to your PATH
when program.when
when program.when # Run a WHEN program
when -i # Interactive mode (limited)
when --version # Show version
when --help # Show help
# hello.when
count = 0
os setup():
print("Starting up...")
fo counter():
count = count + 1
print("Count:", count)
when count >= 5:
break
main:
when count == 0:
setup()
counter.start()
when count >= 5:
print("Done!")
exit()
Run with: when hello.when
x = 10
name = "Alice"
active = 1
def add(a, b):
return a + b
result = add(5, 3)
import math
from time import sleep
from random import randint as rand_int
angle = math.sin(math.pi / 4)
sleep(1)
num = rand_int(1, 10)
# One-shot execution
os initialize():
print("Setting up...")
# Run exactly 5 times
de heartbeat(5):
print("Beat")
# Run forever until stopped
fo monitor():
check_status()
when error_detected():
break
main:
# Setup (runs once)
when not_started:
initialize()
heartbeat.start()
monitor.start()
not_started = 0
# Conditional logic
when heartbeat_complete():
monitor.stop()
exit()
All blocks run cooperatively in the main loop - no threading complexity.
Variables persist between loop iterations, enabling stateful reactive programming.
Start and stop execution blocks dynamically based on conditions.
Access the full Python ecosystem within WHEN programs.
See the included example programs:
clock.when - Simple clock implementationtraffic_light.when - Traffic light simulationrestaurant_sim.when - Complex restaurant management systemtic_tac_toe.when - Interactive game with AIpython_modules_demo.when - Python integration showcaseWHEN is a experimental language. Contributions welcome for:
MIT License - See LICENSE file for details.
FAQs
WHEN Language Interpreter - A unique loop-based programming language
We found that when-lang demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.