Spark Programming Language
A simple, JavaScript-like programming language designed for beginners and rapid prototyping.
Features
- Simple Syntax: Easy to learn and write
- Built-in VS Code Support: Syntax highlighting and execution
- Interactive Input: Built-in input prompts
- Math Operations: Basic arithmetic operations
- Conditional Logic: If statements with comparisons
Installation
- Install the Spark Language extension from VS Code marketplace
- Create a new file with
.sp extension
- Start coding!
Language Syntax
Variables
let name = John
let age = 25
let x = 5
Output
say Hello World
say name
say Hello + name
let name = input
say Hello + name
Math Operations
let x = 5
x = x + 2
let result = x * 3
Conditionals
if age > 18
say You are an adult
end
if name == John
say Hello John!
end
# This is a comment
say Hello # Inline comment
Running Code
- Open any
.sp file in VS Code
- Click the "Run" button in the editor toolbar
- Or use the command palette: "Run Spark File"
Examples
Hello World
say Hello, World!
Calculator
let a = input
let b = input
let sum = a + b
say Result: + sum
Age Checker
let age = input
if age > 18
say You can vote!
end
if age < 18
say Too young to vote
end
Language Reference
Keywords
say - Output text or variables
let - Declare variables
input - Get user input
if - Conditional statement
end - End block
# - Comments
Operators
+ - Addition/Concatenation
- - Subtraction
* - Multiplication
/ - Division
== - Equal
!= - Not equal
> - Greater than
< - Less than
= - Assignment
Contributing
Spark is designed to be simple and beginner-friendly. When contributing:
- Keep syntax minimal
- Prioritize readability
- Maintain JavaScript-like familiarity
- Test with beginners
License
MIT License - Feel free to use and modify!