vienie
v0.3.1
Published
A lightweight, expressive scripting runtime built for fast execution.
Maintainers
Readme
Vienie
Vienie is a lightweight programming language with readable syntax, variables, functions, conditions, loops, collections, input/output, and a simple execution pipeline.
Installation
npm install -g vienieCheck the installation:
vienie --versionRun a program:
vienie program.vieCommands
Setup highlighting syntax for nano:
vienie --setup-nanoSetup Highlighting syntax for vscode:
vienie --setup-vscodeFor any other command use:
vienie -hQuick Start
Create hello.vie:
let name = "World"
say "Hello, " + nameRun it:
vienie hello.vieSyntax
| Syntax | Purpose | Example |
|---|---|---|
| let | Declare a variable | let name = "Nova" |
| say | Print output | say "Hello" |
| ask | Read user input | ask "Your name?" |
| if | Conditional branch | if age >= 18 { ... } |
| otherwise | Alternative branch | otherwise { ... } |
| repeat | Repeat a block | repeat 3 { ... } |
| each | Iterate over values | each item in items { ... } |
| in | Select the collection for iteration | each item in items { ... } |
| make | Define a function | make add(a, b) { ... } |
| give | Return a value | give a + b |
| [] | Create an array | let items = [1, 2, 3] |
| # | Add a comment | # This is a comment |
Functions
make add(a, b) {
give a + b
}
say add(10, 5)Conditions
let age = 17
if age >= 18 {
say "Adult"
} otherwise {
say "Minor"
}Loops
repeat 3 {
say "Vienie!"
}let names = ["Ari", "Mika", "Rin"]
each name in names {
say name
}Operators
+ - * /
== != < >
<= >=Comments
# A Vienie comment
let value = 42Language Pipeline
Vienie Source
↓
Lexer
↓
Parser
↓
AST
↓
RuntimeThe implementation separates lexical analysis, parsing, the abstract syntax tree, and runtime execution.
Syntax Highlighting
Vienie source files use the .vie extension.
Editors can distinguish language constructs such as:
let,makefor declarationssay,askfor input/outputif,otherwise,repeat,each,infor control flowgivefor returned values- strings, numbers, comments, and function calls
Example Program
let name = "Vienie"
let count = 3
say "Welcome to " + name
repeat count {
say "Learning Vienie"
}
make multiply(a, b) {
give a * b
}
say multiply(6, 7)Project Status
Current version: 0.3.1
Vienie is actively evolving. Future releases may expand the standard library, tooling, editor support, and language features while keeping the syntax focused and readable.
Changelog
0.3.1
- Added syntax highlighting for nano
- Added syntax highlighting for vscode
- More vienie CLI commands
0.3.0
- Expanded core language syntax
- Variables and expressions
- Functions with parameters and return values
- Conditional execution
- Repetition and collection iteration
- Arrays
- Input and output
- Comments
.viesource files- Syntax highlighting support
- CLI execution through
vienie
License
MIT
