Vulpin is a tiny, single character command scripting language that runs on top of C!
It was designed to let you write the smallest possible program's.
-
Go to Vulpin Website
-
Then tab to the Download button on novbar
-
Download and Install the version of Vulpin that you want!
or Download source!
Notice: Run as root
python setup.py
If you got Permission Denied, You didn't run them as Root.
- Create a
.vulfile. Likehello.vul:G "Hello World!" G 'Hello World :D' G ''' Hello World?? I can print more text here!!! '''
- Run it:
vulpin hello.vul
Tip
You can remove spaces in your app! dont worry about it! Because if you do that you can build your smallest program like this:
G"Hello World"
name="Armin"
G"Hello" # Prints with newline
P"Loading..." # Prints without newline
G 5 + 3 # Prints 8
Gname # Prints value of variable nameNote
Dividing two integers gives an integer, truncated toward zero: G 7/2 prints 3 and G -7/2 prints -3. Use a float for a fractional result (G 7.0/2 prints 3.5), and math.floor() to round a float down.
Hello
Loading...8
Armin
K user "Your name: "
G"Hi, " + user
# Typed input (invalid → default value)
K age"Age: "I # Integer (default 0)
K price"Price: "F # Float (default 0.0)
K letter"Guess: "L # Single letter (default "")
Kinput"K can write like this! :)"Type characters for K:
| Char | Type | Default if invalid |
|---|---|---|
I |
Integer | 0 |
F |
Float | 0.0 |
N |
Number (int/float) | 0 |
L |
Single letter | "" |
W |
Word (letters only) | "" |
E |
Lowercase only | "" |
U |
Uppercase only | "" |
A |
Letters + spaces | "" |
P |
Alphanumeric + spaces | "" |
x=10 # Direct assignment
name="Vul"
A"x"+5 # x = x + 5
S"name""Vul""VUL" # Replace in string
D"y" # Delete variableString shortcuts:
| Shortcut | Method | Example ($msg.S) |
|---|---|---|
.U |
upper() |
"hello".U → "HELLO" |
.L |
lower() |
"HELLO".L → "hello" |
.S |
strip() |
" hi ".S → "hi" |
.T |
title() |
"hi there".T → "Hi There" |
.C |
capitalize() |
"hello".C → "Hello" |
l=[1, 2, 3]
G l # [1, 2, 3]
G l[0] # 1
G l[-1] # 3 (negative index counts from the end)
l[0]=99 # index assignment
G l # [99, 2, 3]
d={"a":1, "b":2}
G d["a"] # 1
d["c"]=3 # add/overwrite a key
G d # {"c": 3, "b": 2, "a": 1} (Dict/Set order is unspecified)
s={1, 2, 3} # a set is just a brace-list with no ":"
G s+{4} # union
G s-{2} # difference
empty={} # empty braces are always an empty DictMembership, with in:
? 2 in s
G"found it"
;Built-in functions:
| Function | Does | Example |
|---|---|---|
len(x) |
length of a List/Dict/Set/Str | len(l) → 3 |
push(l, v) |
append v to List l (mutates) |
push(l, 4) |
pop(l) |
remove & return the last item | pop(l) |
keys(d) |
List of a Dict's keys | keys(d) |
values(d) |
List of a Dict's values | values(d) |
Note
Lists, Dicts and Sets are references, same as in Python — assigning or passing one around shares the same data, so push/pop/index-assign inside a function are visible to the caller.
D1 # wait 1 second
D0.5 # wait 0.5 seconds
D delay # wait the value of variableYou can Import Vulpin Modules with using U.
G os.getcwd()
os.system("echo Hello")
os.system(ls)
U"math"
G math.sqrt(16)os.system() and os() and o() are the same!
and you can write like: o"echo hi"!! with no ()!!
score=85
? score m 90 # m means >=
G"A"
:
? score m 80 # m means >=
G"B"
:
G"C"
;
;and also <= means l if you want to use.
x=5
? x > 3 J skip
G"Not printed"
L skip
G"Printed"i=0
@ i < 5
G i
i=i+1
&@1
G"Running forever..."
&O i 0 5 # 0,1,2,3,4
G i # or Gi
&
O x 10 0 -2 # 10,8,6,4,2
G x # or Gx
&fruit="apple"
W fruit
V"banana"
G"yellow"
V"apple"
G"red or green"
N
G"unknown"
ZJ end
G"Skipped"
L end
G"Done"F add(a, b)
R a + b
~
G add(3, 4) # 7
F greet(name)
G"Hello " + name
~
greet("World")T
x=10
y=0
G x/y # division by zero!
C"err"
G"Error: " + err
Y
G"Continues..."Error: division by zero
Continues...
You can write all of your commands just in a line by using ;!!
For example:
a=5;?a==5;G"yes it is!";
In a word: ; breaks each command's
G"Hello World"U"random"
secret=random.randint(1,10)
tries=0
L guess
Knum"Guess (1-10): ""I"
tries=tries+1
? num=secret
G"Correct! Tries: "+tries
Q
:? num<secret G"Higher"
: G"Lower"
;
J guess
F factorial(n)
? n<=1
R 1
;
R n*factorial($n-1)
~
G factorial(5) # 120To check the version of Vul you are running:
vulpin versionOutput:
Vulpin 1.0.1
Let's fix your problems!
- Python Type Hint Syntax Error:
this is known error in new Vulpin version like you can see it at most in version
0.5but thats easy to fix!- on vulpin 0.5 this error might be in line of
682or line of77or etc...! take a look at here to see how to fix: https://github.com/orgs/community/discussions/199748
- on vulpin 0.5 this error might be in line of
- Spaces are optional after commands.
G"Hi"andG "Hi"both work. - The dot operator (like
os.name) works correctly in the latest release. If you encounter issues, use the--debugflag to see detailed parser output.
MIT LICENCE. CHECK OUT LICENCE. ICONS ARE UNDER LICENCE TOO.
Happy coding with Vulpin!
FluxCast

