https://github.com/kokonut27/zsq
A complex language with high level programming and moderate syntax.
https://github.com/kokonut27/zsq
bash complex lang language nix pl python shell syntax zsq
Last synced: 6 days ago
JSON representation
A complex language with high level programming and moderate syntax.
- Host: GitHub
- URL: https://github.com/kokonut27/zsq
- Owner: kokonut27
- License: apache-2.0
- Created: 2021-12-13T13:17:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-01T15:18:36.000Z (over 2 years ago)
- Last Synced: 2024-01-01T16:26:13.490Z (over 2 years ago)
- Topics: bash, complex, lang, language, nix, pl, python, shell, syntax, zsq
- Language: Python
- Homepage:
- Size: 177 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/kokonut27/zsq)
[](https://github.com/kokonut27/zsq/releases)
# z^2
> a complex language with high level programming and moderate syntax.
## Get started
### Usage
1. Clone this repository:
```zsh
$ git clone https://github.com/kokonut27/zsq.git
```
2. Add an alias
#### macOS/Linux
If you use macOS Catalina or newer, you will use Z-Shell so you will have a `.zshrc` file in your home folder. Most distributions of Linux use Bash by default, so you will have a `.bashrc` file in your home folder.
> *Of course, it is possible to change your shell so you should check before running the command.*
Run the following command. If you use Bash replace `.zshrc` with `.bashrc`:
```zsh
echo "alias zsq='python -B zsq'" >> .zshrc
```
#### Windows
*You may want to install [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install)*
```zsh
echo "alias zsq='python -B zsq'" >> .bashrc
```
#### Shell
```zsh
$ alias zsq="python -B zsq"
```
3. Run z^2
Create a file named `index.zsq`, which will contain all of your code. Then enter the following in the shell:
```zsh
$ zsq index.zsq
```
Then you're all done!
### Example program
```js
// Defines the Fibonacci function
function Fibonacci(num) { // Creates an arg 'num'
whatif num <= 1 {
return(num)
}
else {
return(Fibonacci(num-1) + Fibonacci(num-2))
}
var ask = prompt("amount of fibonacci sequence? ")
for fib_seq in span(ask) {
print(Fibonacci(fib_seq))
}
```
> This is a current work in progress as of right now.
> Visit [EXAMPLES.md](https://github.com/kokonut27/zsq/tree/main/examples) for more examples.
### Contributing
Feel free to contribute by [forking](https://github.com/kokonut27/zsq/network/members) the repo, and leaving a pull request!