Giter VIP home page Giter VIP logo

rabbit's Introduction

Rabbit

Rabbit is a modern, functional programming language built on top of Python.

Travis CI Build Status

The Code

This repository hosts all the code for the Rabbit interpreter. Simple wrapper Python files for booting up common features are provided in the main repository. These are:

  • runcli.py: Boots up the Rabbit interpreter Command Line Interface.
  • runcmd.py: Boots up the Rabbit interpreter GUI Command Line.
  • runcomp.py: Boots up the Rabbit interpeter data serializer and program executer.
  • rungraph.py: Boots up the Rabbit interpreter function grapher.
  • runride.py: Boots up the Rabbit interpreter Integrated Development Environment.
  • runtests.py: Runs the tests for the Rabbit interpreter.
  • runall.py: Imports all the Rabbit interpreter libraries for use in Python.

The actual code for the interpreter can be found inside the rabbit folder. Inside that, the rabbit/carrot folder holds the carrot library, a library for the more general features that the Rabbit interpreter makes use of.

Executive Summary

For a short explanation of what Rabbit is and what it can do in layman's terms, see the Executive Summary, which can be accessed at docs/Executive Summary.pdf.

Academic Paper

The full academic research report written on the Rabbit programming language is hosted here, and can be accessed at docs/The Rabbit Language.pdf.

Technical Whitepaper

It is recommended that anyone who wishes to become familiar with the Rabbit programming language read the full Technical Whitepaper. The full Rabbit Technical Whitepaper can be accessed at docs/Technical Whitepaper.md.

Code Examples

The example code file in the documentation provides comparisons between Rabbit code and code in other languages used to solve the same problem, allowing one to see the differences between the way things are done in Rabbit and the way things are done in other languages. That file can be accessed at docs/Code Examples.md.

Example Rabbit code can be found in many other places as well. The tests for the programming language itself function as good code examples, since, because of their nature as tests of all the features in Rabbit, they cover all the features in Rabbit. They can be accessed at Tests.rab.

rabbit's People

Contributors

evhub avatar

Stargazers

Simon avatar  avatar David Starner avatar astrolemonade avatar latrokles avatar Mohamed Saher avatar Conrad Steenberg avatar  avatar David Martínez avatar Emre Şafak avatar  avatar Danilo Lekovic avatar Omer Katz avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  avatar

Forkers

monjikura

rabbit's Issues

Add a real dictionary

Should allow anything as keys. This could integrate with the existing classes, but need not.

Improve f.g syntax

All . syntax not for methods should be consolidated into a class like roll, deriv, or integ and handled in the same way.

Add index setting

Add the ability to set to particular indexes in a list or string, as well as what already exists with classes

Add python-like importing

When importing another Rabbit module group all the defined names into a class and return that. Also allow some of those to then be put into the main namespace.

With clauses

Evaluates an expression with a variable set to some value. Proposed symbol is the dollar sign ($).

Proposed syntax would be:

f(x) $ x = 1 $ f(x) = x+1
( f(x) $ x = 1 ) $ f(x) = x+1

Which would be equivalent to:

{ x = 1 ;; f(x) = x+1 }:"f(x)"

Improve comparison

Equality/inequality operators need improvement. for example, they should recursively search through containers and compare the elements in them. and 1 < x < 2 should translate into 1 < x & x < 2.

what it should do is loop through each element--for example:
check whether the first ones are equal, if not, compare them, if so, continue to the next element. same thing. then when you get to the last element if they're still equal, then fully compare them, as in, if they're equal, don't just continue--do what being equal would mean for the equality/inequality operator.

Separate imperative and functional code

Like Haskell, all imperative code should be separated from all functional code. If this is done, it should be impossible to do resets in the functional code, or at least it should be disabled by default.

Add functional object orientation

Use Python-like first-arg-is-self and insure self is always returned as the first return value, and that the old self isn't modified, only the new one that is returned.

Implement multithreading

Once side effects have fully been removed from the language, basic operations that take multiple parameters can and should be multithreaded.

Implement dictionaries

Syntax:

my_dict =
 {
  a key =
    "a_value" ~~
  2 =
   3 ~~
  f(x) =
   x
 }
my_dict : "a key"
my_dict "a key"
my_dict("a key")
my_dict["a key"]
my_dict . f

Fix parentheses evaluation

This currently doesn't work:

a(b).c

Solution:
Split based on where there is multiplication, then evaluate each individual one, then recombine.

Bring graph.py up to Rabbit standards

Lots of changes have been made to Rabbit since Grapher was written. The breaking changes were accounted for, but the code still needs additional modernization.

Add generator support

Should be implemented with a fake matrix that has a function built in that takes the coordinates as its params.

Implement empty indices

Should go to start or end, depending on whether the empty indice is first or last. Also make sure negative steps and higher to lower work.

Wrap Python string processing

After Rabbit string processing, then apply Python string processing. Insure no code injection is possible. Also allow the use of raw strings.

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.