GithubHelp home page GithubHelp logo

quail-language / quail Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 1.02 MB

Second iteration of a super-flexible and simple Quail scripting language

License: GNU General Public License v3.0

Java 88.44% q 3.84% HiveQL 0.03% HTML 7.30% Shell 0.04% Batchfile 0.04% Inno Setup 0.31%
interpreter java java-8 programming-language programming-language-development programming-language-interpreter runtime

quail's Introduction

Logo

Quail

An easy-to-use scripting language with simple yet powerful syntax

GitHub License GitHub Downloads (all assets, all releases) GitHub Actions Workflow Status GitHub Issues or Pull Requests GitHub Release

Website · Docs · Issues

About project

Quail is an easy-to-use scripting language with simple yet powerful syntax, embeddable in Java applications and supporting a plenty of different approaches for designing code and writing it.

Find out more on the website

Quail's main purposes are: developing utilities, using it as a script language for bigger project and using it for education.

Installation (automatic)

On Windows and Linux

Download and run installer from downloads page

If you are on Linux, don't forget to chmod +x quail-installer.sh

After you've installed Quail with this installer, you can access Quail Runtime with quail command and Quail Development Kit with quail-qdk command. Find out more about commands in Quail Specification Chapter 12

Manual installation

On Windows
  1. Make sure you have at least Java 8 installed
  2. Download your chosen Quail version
  3. Place qre.jar and/or qdk.jar into some folder on your computer
  4. Create an environment variable called QUAIL_HOME and set it to that folder
  5. Place the following contents into file at C:\Windows\quail.bat
    @echo off
    if exist "%QUAIL_HOME%\jre\jdk1.8.0_402\bin\java.exe" (
    "%QUAIL_HOME%\jre\jdk1.8.0_402\bin\java.exe" -jar "%QUAIL_HOME%\qre.jar" %*
    )
    if not exist "%QUAIL_HOME%\jre\jdk1.8.0_402\bin\java.exe" (
    java -jar "%QUAIL_HOME%\qre.jar" %*
    )
    
  6. Place the following contents into file at C:\Windows\quail-qdk.bat
    @echo off
    if exist "%QUAIL_HOME%\jre\jdk1.8.0_402\bin\java.exe" (
    "%QUAIL_HOME%\jre\jdk1.8.0_402\bin\java.exe" -jar "%QUAIL_HOME%\qdk.jar" %*
    )
    if not exist "%QUAIL_HOME%\jre\jdk1.8.0_402\bin\java.exe" (
    java -jar "%QUAIL_HOME%\qdk.jar" %*
    )
    
  7. Now you can access Quail with quail and quail-qdk commands
On Linux
  1. Make sure you have at least Java 8 installed
  2. Download your chosen Quail version
  3. Place qre.jar and/or qdk.jar into /bin/quail-jars/
  4. Place the following contents into file at /bin/quail
    #!/bin/bash
    java -jar /bin/quail-jars/qre.jar $@
    
  5. Place the following contents into file at /bin/quail-qdk
    #!/bin/bash
    java -jar /bin/quail-jars/qdk.jar $@
    
  6. Run
    sudo chmod +x /bin/quail
    sudo chmod +x /bin/quail-qdk
    
  7. Now you can access Quail with quail and quail-qdk commands

First test

Write a short script:

print("Hello, World!")

Then execute it:

quail run myscript.q

You will see the output in your console

Where to go next?

If you are completely new or an amateur to programming, read Getting Started with Quail 2.0+

If you are very confident with different languages, and you are aware of abstract syntax concepts, you can go straight to Quail Specification, Quail Core Docs and Quail Library Docs

Also check out examples.

License

This work is licensed under GNU General Public License v3.0

Contact

You can contact the developer in the Issues tab or in Discord server.

Developer

Project was being built from scratch and is being developed now only by @Tapeline

quail's People

Contributors

tapeline avatar quail-language avatar

Stargazers

David Dzhalaev avatar  avatar  avatar

Watchers

 avatar

Forkers

tapeline

quail's Issues

Feature-request: Python-like lambdas

Right now (as of issue creation time) anonymous functions can only be declared like this:

f = (x) -> return x^2

Which gets pretty annoying when it comes to using functions like map:

map((x) -> return num(x), input().split())

The suggestion is that another operator should be added, which will allow creation of one-expression instant-return lambdas:

map((x) => num(x), input().split())

Suggestions for operator symbol:

  • =>
  • ->:
  • other suggestions could be added in comments below

This operator should be a syntaxic sugar and at parse-time should unfold into regular lambda.

Fix occasional error display bugs

From time to time instead of outputting the erroneous line, interpreter outputs following:

!!! internal error !!! unable to display line !!!

E.g. with this code:

f = x -> print(x)
f("Hello")

I get:

Parser error:
At character 6 line 1
 1 | !!! internal error !!! unable to display line !!!
     ^~
Unparseable expression or statement

Request: create a built-in request library

Right now (as of issue creation time) Quail lacks the ability to connect to the internet. It should have a built-in internet request library (for example like requests in Python).

Request function signature suggestion:

function get(
    string url,
    dict queryParameters={},
    string|dict data={},
    list files=[],
    list cookies=[],
    dict headers={},
    dict|void auth=null,
    num timeout=-1
) {}

which can return an object with response info (content-type, headers, cookies, body, etc.)

Similar functions are suggested for other HTTP methods (POST, PATCH, etc.)

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.