Giter Site home page Giter Site logo

zsq's Introduction

code size version

z^2

a complex language with high level programming and moderate syntax.

Get started

Usage

  1. Clone this repository:
$ git clone https://github.com/kokonut27/zsq.git
  1. 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:

echo "alias zsq='python -B zsq'" >> .zshrc

Windows

You may want to install Windows Subsystem for Linux

echo "alias zsq='python -B zsq'" >> .bashrc

Shell

$ alias zsq="python -B zsq"

  1. Run z^2

Create a file named index.zsq, which will contain all of your code. Then enter the following in the shell:

$ zsq index.zsq

Then you're all done!

Example program

// 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 for more examples.

Contributing

Feel free to contribute by forking the repo, and leaving a pull request!

zsq's People

Contributors

dillonb07 avatar kokonut27 avatar ray0716 avatar sourcery-ai[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

dillonb07 ray0716

zsq's Issues

`whatif` statement true/false run

Describe the bug
The inside of the whatif statement still runs even if it's false.

Expected behavior
If whatif value is false, then it should pass.

Todo List

Todo:

  • #1
    • Fix printing input value
    • Fix printing functions value
  • #2
    • Create easy alternative to solve this
  • #3
    • Create print function
    • Create prompt function
    • Create cprompt function
    • Create variables function
    • Create multiline comment
    • Create while statement
    • Create whatif statement
    • Create range statement
    • Create function function
    • Create adding math
    • Create time module and functions
    • Create os module and functions
  • #4
    • Insert images
    • Insert the real information
    • Add code examples
    • Add code
    • Add contact information
    • Add tutorials page
    • Fix github deployment

[TODO] Finish the basics of the language

Is your feature request related to a problem? Please describe.
It currently does not have a lot of functions, and try to finish at least the basics of this language soon.

Describe the solution you'd like
Work on this a lot, and figure out alternatives to solve problems.

[BUG] Fix printing variable issue

Describe the bug
When printing variables (specifically functions) it returns invalid values and/or errors. This includes input values as well.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the installation tab of this project's README, and follow the steps.
  2. Create a zsq file, and copy and paste the contents in the tests directory of the file index.zsq (tests/index.zsq)
  3. Run the program/language.
  4. See error.

Expected behavior
The variable value is to show up, or the function value is to properly show up.

Desktop (please complete the following information):

  • OS: ChromeOS
  • Browser: Chrome
  • Version: 96

[TODO] Work on easy installation

Is your feature request related to a problem? Please describe.
Currently, installing seems a bit weird, so fix this ASAP.

Describe the solution you'd like
Installing is easier, and be able to run the zsq file, not the python file first.

Describe alternatives you've considered
Perhaps make an input or use the python module click to achieve this.

[DOCS] Finish the docs

Is your feature request related to a problem? Please describe.
The docs currently do not hold any information, so fill this out after v1.0.0 of z^2.

Describe the solution you'd like
A clear and concise docs that holds lots of information.

Describe alternatives you've considered
Use HTML, and view other docs as examples.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.