Code Monkey home page Code Monkey logo

greenberry's Introduction

first-timers-only Open Source Love MadeinMoris

greenberry

A one-line statement programming language, complete with classes, cli and file compatible.

logo

python -m pip install greenberry
greenberry file.gb

contributing countries

๐Ÿ‡ฒ๐Ÿ‡บ ๐Ÿ‡ฒ๐Ÿ‡พ ๐Ÿ‡ธ๐Ÿ‡ฎ ๐Ÿ‡ฐ๐Ÿ‡ช ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡ฎ๐Ÿ‡ณ

๐Ÿ‡จ๐Ÿ‡ฆ ๐Ÿ‡ง๐Ÿ‡ณ

๐Ÿ”— links

๐Ÿ“– contributing guidelines

Read greenberry/theory_notes_simple.py

python -m pip install -e .
python -m pip install -r reqs/dev.txt
pre-commit install

๐ŸŒ„ contribution areas

  • syntax : propose new syntax or suggest improvements for existing one
  • language : in the way python code is written so as to be more clear, efficient for example
  • gui : either ide or others, add new functionalities or improve UX
  • cli : improve cli experience, add new features
  • compiling engine : improve parser, add new areas of usage (of greenberry, like on arduino? an electronics library?). also add support for approved new syntax
  • website : improve website, update changelog (or implement changes to do this automatically)

๐Ÿ‚ python version

3.4 (moving to 3.7 if you PR a change using a 3.7 feature)

๐Ÿข structure notes

๐ŸŒŠ run files

Read here or follow below

REPL ๐Ÿ”ง

Just run python gb_repl.py

.gb file ๐Ÿ“

Write in main.gb and then save and run python gb_main.py

IDE ๐Ÿ–ฅ๏ธ

Run python gb_ide.py write and run or load a .gb file!

๐Ÿ“‹ TODO

  • Refining print
  • Add more support for eval
  • Add parameters to functions and classes
  • Allow non-static referencing of function and classes
  • New syntax and implementation
  • Expand use

๐Ÿ“ง quick contact

Abdur-Rahmaanj : [email protected]

TimThuma : [email protected]

credits

@arwinneil for opensource and madeinmoris badges

greenberry's People

Contributors

0x32767 avatar 0xgodspeed avatar 5aumy4 avatar abdur-rahmaanj avatar blbt1 avatar chrigkou avatar dev49199 avatar djmot avatar hammi99 avatar hassaanseeker avatar huynhbrandon avatar ju-sh avatar kushalvijay avatar leonlit avatar prikshit7766 avatar pronoym99 avatar salty-ivy avatar san411 avatar ssebs avatar sterben04 avatar thisusernameisavailable avatar tthuma1 avatar verascity avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

greenberry's Issues

Support for conditionals like "else if" and "else"

I tried the following in the IDE :
if 2 = 2 : print yes
else print no
And the output was :
yes
no
I think there should be an error message displayed for the use of "else".

Currently the code supports only "if" but not "else if" or "else". I think we should add these functionalities as well.

Erroneous execution of statements even though there is a syntax error.

Like if I write
func vector print string vector is fun ( intentionally leaving out the colon after function declaration )
I get the output as
dear berry you ill defined a function on line 1
vector is fun
that is even though my syntax was wrong print command gets executed. Another example
if print hello will give this as output
dear berry you made a mistake on an if statement on line 1
hello

Is this by design or is this an unintended error?

better deal with EOF

our current End Of File strategy is just to append '{end-of-file}' at the end of statements. need a better plan

group utilities files in folder

create a folder named gb_utils and add the following files to it

greenberry_print
greenberry_lex
greenberry_parse
greenberry_plot
greenberry_search
greenberry_var_type

fix imports in greenBerry.py after

Support for >= and <= on if conditionals

I was going through the GreenBerry code and syntax and noticed that 'greater than or equal' ( >= ) and 'less than or equal' ( <= ) signs are currently not supported for if conditionals. I would like to work on it and add this functionality if that's alright.

Little thought about plotting.

In the syntax documentation, the command

plot 1-2-3-4-5 time[s], 24-34-56-78-45 speed[m/s]

plots a curve, and how about expands the command to

plot 'x.txt' time[s], 'y.txt' speed[m/s]

, where x-axis and y-axis data are all stored in the 'x.txt' and 'y.txt'?
Of course this is just part of the possible expansion, I believe I can make the plotting command better.

Remove Extra White Spaces And Cleaning Code

I found too many extra white spaces in most of the python files, from this issue I intend to remove them so that the code looks clean, also rewrite proper comments wherever needed, and improving the README.md file.

error in gb_repl when run not recongized code

When I try to play with gberry on it's repl, if I wrong to digit a command or I digit a wrong or not recongized command, it's end repl execution and report me a python error on greenBerry.py.
It is a decision to not handle this stuff or is it a wip?

add tests

  • for lexer
  • for parser
  • for utilities

Style for python code

I was looking at the code. And wanted to know what coding style are we using for python3.

add ide usage tutorial

either on wiki or a separate markdown document. add code running instructions on ide with screenshots

IDE

Create an IDE with file editing and running option

Support for multi-line print statements

I tried the following code snippet in the IDE:
print string good going
Toby
Expected Output:
good going
Toby
And the actual output was just:
good going

I believe it would be better if there was an error message displayed in such cases. Additionally we can also add code to support multi-line print statements.

Please let me know what you think.

Variable assignment problem

When assigning a variable with var x = 1 the code doesn't recognize the '=', so you can write var x djncjd 1 and still achieve the same thing.

Add search function to IDE

Make a new option on the menu that would trigger a search function. When clicked it would pop-up a small box in which user can type input. Then find this input in the text and highlight it.
Then you can carry out a replace function from this.

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.