andrefpoliveira / Pansy

My own programming language
MIT License
21 stars 15 forks source link

Add examples #5

Open andrefpoliveira opened 4 years ago

andrefpoliveira commented 4 years ago

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!

prashanth-up commented 4 years ago

Awesome Language you've made here. I was looking to contribute but I couldn't find how to run the .pansy file to check my outputs. I tried running an if-else on CLI but line-breaks are not accounted well there. Any suggestions how ?

andrefpoliveira commented 4 years ago

Hey @prashanth-up! First of all, thank you very much for trying to contribute! 😁 it means a lot to me! You are right, I have put the command in the middle of the others so it is not explicit. I will change that so it more visible! The command should be: run("examples/.../code.pansy")

prashanth-up commented 4 years ago

Worked like a charm. It was my bucket list item to create my own programming language too.πŸ˜„ Although It seems with improvement this parser could be very promising. My code gives a Runtime Error: Argument must be a list when I try to return len("Pansy") which accepts a string. Am I missing something here?

andrefpoliveira commented 4 years ago

@prashanth-up it is very funny to make one :) I strongly advise it! Yeah. Currently I had it only to accept lists. But I can add string support aswell

prashanth-up commented 4 years ago

Just going around Github and taking notes on how to make one. Actually in your README it says len(arg) - Returns the length of the string arg I guess it's list instead of string

andrefpoliveira commented 4 years ago

Ups my bad you are right!!

prashanth-up commented 4 years ago

Seems accurate now, I'll send in a PR with some basic code Examples for Pansy around tomorrowπŸ˜„

andrefpoliveira commented 4 years ago

@prashanth-up thank you very much!

UjwalKandi commented 4 years ago

Do we also have to edit the main README.md file in the examples folder that shows the list of examples?

andrefpoliveira commented 4 years ago

@UjwalKandi it would be awesome if you did that :)

Zaidtech commented 4 years ago

@andrefpoliveira awesome language, can I also add some examples

andrefpoliveira commented 4 years ago

@Zaidtech of course!!

FaizAlam commented 4 years ago

@andrefpoliveira can I add some examples !!

andrefpoliveira commented 4 years ago

@FaizAlam sure!! πŸ˜„

punitsakre23 commented 4 years ago

I like to contribute and add some examples

punitsakre23 commented 4 years ago

Done bro. Thanks