Git Product home page Git Product logo

pansy's Introduction

⚠️ Archived ⚠️

This repository is no longer being maintained.

Pansy

Build Status

My own programming language, currently under development

Discord Server

https://discord.gg/ybHPrde

How to start

Pansy Documentation

This Documentation aims to help new contributors so they can start working with Pansy

This documentation at this stage is pretty much a work in progress, so contributions, feedback and suggestions are very welcome!

How to build the docs

  1. Fork this repository

  2. Clone this repository using the following command

    git clone https://github.com/<your-username>/pansy.git

  3. Install sphinx on your local machine using

    pip install -r requirements.txt

  4. cd into docs folder. cd docs

  5. Build HTML

    make html

  6. cd into _build folder.

    cd _build/html

  7. Open the generated HTML files in your browser.

    Now you can open the docs on your local machine! just open the index.html in your web browser!

pansy's People

Contributors

andrefpoliveira avatar daffytheduck avatar galbatorix2011 avatar himanshuvarandani avatar nisnym avatar punitsakre23 avatar shreenabh664 avatar ujwalkandi avatar vanshajpoonia avatar weibeu avatar zaidtech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pansy's Issues

[ENH] Classes in Pansy?

Classes in Pansy?
I would like to group all my functions into a class. Is it possible here? I don't remember seeing it in the docs.

Classes
If I have hundreds of functions, I'd like to group all the related ones together. Or, if I want to create a blueprint of a person, I'd want to put methods for things a person would do, like walk, run, and so on inside the class Person, and not have functions all over the place. I think classes are necessary for any programming language.

Shift the docs to readthedocs

It would be great if we shift the README.md to readthedocs, it will be really nice for new contributors as they can make the offline copy for themselves

labels can be added like:- Hacktoberfest

P.S.- I'm working on this 😄

Logo Needed

Hey 😄!

Pansy is such a beautiful flower 😉 and in my country it is known as Amor Perfeito ( Perfect Love in english )

Well basically, I would like to get a logo for my programming language!

Surprise me 😃!!

Add new Built-in Functions

Hey! Currently Pansy doesn't have a lot of built-in functions. That's were you come in!

If you want to work on any of these please say so, like this no one is working on each other functions.

How to add new functions

To insert a new function you need to go to lib/interpreter.py. You can search for def execute_print and you will find below all the built-in functions created so far. You can use those as examples!

Then you search for BuiltInFunction.print and you will get 2 results! Follow those examples to add your function.

List

Below is a list of the current built-in functions, some ideas and who is working on them:

  • print
  • input
  • is_number
  • is_string
  • is_list
  • is_function
  • append
  • pop
  • set
  • extend
  • get
  • run
  • len
  • to_str
  • to_int
  • to_float
  • imports
  • abs
  • has_key
  • min (between 2 numbers) @DaffyTheDuck
  • max (between 2 numbers) @DaffyTheDuck
  • slice
  • split
  • oct @DaffyTheDuck
  • fact @Zaidtech

If you have any other idea feel free to share it down in the comments so it can be added to the list.

[BUG] Not able to use if conditions!

Description
Not able to use if conditions: gives an error

Traceback (most recent call last):
  File <stdin>, line 1, in <program>
  File <stdin>, line 1, in run
Runtime Error: Failed to finish executing script "bug.pansy"
Traceback (most recent call last):
  File bug.pansy, line 2, in <program>
Runtime Error: Illegal operation


if food == "pizza":
   ^^^^^^^^^^^^^^^^
  print("Yammi!")
^^^^^^^^^^^^^^^^^
end
^^^

run("bug.pansy")

I am on Windows

To Reproduce The Error
Steps to reproduce the behavior:

  1. Start Pansy with the command python shell.pansy
  2. Execute the code run("bug.pansy") in the shell (I have created a file called bug.pansy for this issue)
Bug.pansy:

var food = "pizza"
if food == "pizza":
print("Yammi!")
end
This was an example in the documentation.

Note:
If you write

var n = 10
if n == 10:
  print("n = 10")
end

This works. It is a problem with checking strings.

Expected behavior
Expected to print Yammi! Instead printed illegal operation error

Screenshots
image

image

image

image

I am on Windows x64 Intel.

Add examples

Hey 😁
When trying my programming language you are more than welcome to submit your code files here on the folder examples so others can check it out!

Please make sure you follow the structure of the rest of the other texts because I have a CI support that will verify everything is ok 😃

Don't forget to update the README.md aswell!

Thanks and have fun!

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.