code is in developement stage please wait for a release
Musket is an open source project which is aiming to create a formal,reliable and efficient language like go and c++ but also a language with short,concise and verbose syntax like python and ruby
sample program
hw|a|b|c = "hello, world"|3|a|b
println ("hello, world")
println "hello, world"
println hw
print "hey did you know {a} = {b} = {c}"
x = subtract(a,b)
y = subtract a,b
z = subtract a and b
func subtract (a,b){
return a-b
}
println " and that {x} = {y} = {z}"
{var_synt}
var_synt <- (
println "stopping execution"
)
output
hello, world
hello, world
hello, world
hey did you know 3 = 3 = 3 and that 0 = 0 = 0
stopping execution
PRESENT SYNTAX
- SYNTAX
- normal assignment
- syntax assignment
- printing
- user input
- if/else
- while
- OPERATIONS
- arithmatic
- boolean/logical
- relational
- bitwise
- PROGRAMMING FEATURES
- Lexical Variable Scoping
- Procedural programming
- Functional Programming
- Variable Syntax
- Auto Main
- ERROR_HANDLING
- SYNTAX
- Multi Threading (more like processes)
- Structures/classes
- For loops
- flow control and other advanced functions
- Allowing the usage of parenthesis and semi colons in code
- Debugging the if/else and while's multiprinting error
- Maths
- priortizing parenthesis
- BODMAS
- Programming features
- Smart Interpreter
the extension for the file should be .mskt
-
I have added shell script in the following code for faster execution This will work in linux or any other UNIX os which use bash script or have bash
here are some lines you will have to write on the bash before actually being able to execute the shell scriptafter executing the given lines the following commands will become valid only for THE PRESENT TERMINAL SESSION$ chmod +x viper # makes the script executable $ export PATH=$PATH:~/Documents/VIPER-master/src/linux # you can also use the mac branch as both are the same
this will execute the desired file another alternative to this isviper run [args] # or viper -r [args]
this will run lethalityTest.vpr you can change the contents in it if you want to run the viper shell with the bash just typeviper run -d # or viper -r -d
viper shell # or viper -s
For the present commands which were added to the script typeviper --help # or viper help # or viper
- I use linux and I have neither learned nor do I use powershell so I don't know powerShell BUT I am going to learn it moving on and when I do then this section will be more appealing then it is right now
-
open the terminal or ide and compile and run the go code then it will ask for an argument "> " then just type in "run fileName.vpr", the file should be in the same directory as the file or pwd(present working directory), if you want quicker access then modify the lethalityTest.vpr and type "run -d" as it is set to default path
type quit or control-c to exit