Git Product home page Git Product logo

gazelle's Introduction

gazelle Build Status Python Version License: GPL v3

Gazelle is a tiny lisp-like scripting language built with Python.

Gazelle is:

  • Easy to setup
    • Have Python? You can run Gazelle. Gazelle requires no external dependencies (that shouldn't be already downloaded)
  • Inspired by LISP and Scheme
    • Gazelle code is written entirely with prefix notation in the form (procedure expression)
    • Gazelle has no true AST, instead the programmer ends up directly coding the AST for Gazelle to interpret
    • Only 3 fundamental types: Atoms, Lists, and Procedures
  • Extendable
    • Adding features to Gazelle is simple and easy through editing the python source or via directly programming in Gazelle itself

Not convinced? Gazelle can be used to write answers to Project Euler questions. Here's problem 1:

(return (sum (filter (\ (n) (or (= (% n 5) 0) (= (% n 3) 0))) (range 1000))))

Getting Started

Here's how you can get started programming in Gazelle.

Prerequisites

Before you can run Gazelle, you'll need to have Python 3.6 installed for your respective OS. Then, make sure to download either the latest release of Gazelle or the latest master.

Running Gazelle

For more detail, check out the getting started guide

Windows

To run the repl, run python gazelle.py in the root directory from the commandline.

Linux/OSX

To run the repl on linux/OSX, you can run python3 gazelle.py in the root directory of Gazelle.

Basic Usage

The Gazelle REPL provides all the basic utility you need to begin toying with it.

In addition, files can be ran by using a file path as your argument such as python gazelle.py ./example/euler/one.gel and files can be run in succession such as python gazelle.py ./example/euler/one.gel ./example/euler/two.gel

Running the Tests

First, install the testing requirements.

$ pip install -r requirements.txt

To run the tests, run pytest tests/testsuite.py from the root directory. This will start the tests and get benchmarking data.

Code Examples

Take a look at the getting started guide and our documentation to learn how to code with Gazelle. You can view example programs in the examples folder packaged with Gazelle.

Contributing

Take a look at this page you can contribute to Gazelle.

License

GPL

This code is released under the GNU GENERAL PUBLIC LICENSE. All works in this repository are meant to be utilized under this license. You are entitled to remix, remodify, and redistribute this program as you see fit, under the condition that all derivative works must use the GPL Version 3.

Acknowledgements

gazelle's People

Contributors

surrsurus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gazelle's Issues

Not scared of print

For some reason, the DeerCode interpreter is not frightened by things printing. Usually deer are afraid of strange noises and, since a human usually operates a printer, humans.

It would be far more accurate for the code not to run 90% of the time out of being spooked.

Add More Project Euler Answers

Add More Project Euler Answers

In order to showcase the functionality of deercode, more answers to project euler should be written.

Max Recursion Depth Exceeded

Max Recursion Depth Exceeded

When running recursion intensive programs such as ./euler/three.gel the Python interpreter raises an exception that prevents the Gazelle program from fully terminating.

Steps to reproduce bug:

  • Run ./euler/three.gel

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.