Lel-Language / Lisp-esque-language

πŸ’ The Lel programming language
MIT License
27 stars 2 forks source link

Lel interpreter in Python 3 #30

Open osaatcioglu opened 7 years ago

osaatcioglu commented 7 years ago

This is a great project to learn the basics of a compiler. I checked the code and it looks pretty clean and neat. But, it is Node.js. :) So, I think writing an interpreter in Python will help more students/beginners to dive in to the details and learn the basics by reading the code.

If you don't mind, I would like to volunteer to this task. :)

I forked the repo already and started with the baby steps. I hope I can have something tangible within couple of weeks.

francisrstokes commented 7 years ago

Hi Omer,

That's a cool idea - python 3 is a nice language. I don't think that python vs javascript is a debate worth getting into, but I would like to think that the conventions and patterns used in this project are such that a beginner or student could quite easily follow the code.

That said, I would love to see a python version of the Lel language - please don't hesitate to contact me if your curious about anything or would like input πŸ˜„

osaatcioglu commented 7 years ago

Haha! I didn't mean to get in to a debate really! I like both equally. :)

Thank you for the encouragement. I am planning to align as much as possible to your conventions and patterns also feature issues to follow the more or less the same development cycle.

If I need help, I will get in touch with you by referring you on my issues. Thanks!

ProSpartan commented 7 years ago

I would like to see this in python, and perhaps other kinds of languages as well.

I myself am currently copying by hand to a closed network that does not have Node.js, yet, but has python and java support.

I look forward to seeing your progress.

francisrstokes commented 7 years ago

@ProSpartan yes, python is more ubiquitous in environments. by the way, thanks for the fixes in your fork! I merged those into the mainline today. If you have more, please make pull requests - because you didn't make the PR it doesn't put you into the list of contributors (I don't know why, they are still merged from your fork πŸ€·β€β™‚οΈ ), but it deserves to be there.

ProSpartan commented 7 years ago

Thanks. I was planning to merge them into my master branch after I had gone through all the files. After that I was going to make a PR to yours. Just wanted to get an initial pass through and add all the minor fixes at one time.

osaatcioglu commented 7 years ago

Hi @ProSpartan and @francisrstokes

I finally feel confident to say the first version of LEL Interpreter in Python is ready. Please check in my repo. https://github.com/osaatcioglu/Lisp-esque-language

I made it working with Python2 as well as I found it is not that hard to do during the packaging. I also push to PyPI. You can install it using

pip install lel-lang

and run it by

pylel

Except the extensions (read file sync), I think it should work as it should be. Moreover; I did some extra features in REPL like:

@francisrstokes I have created a folder named python and put all of my source code underneath. But, I wonder what is the best way to continue. Should we merge it back it in your repo which might require some folder update in node project Or should we keep them separate.

I am equally OK for both options. :)

francisrstokes commented 6 years ago

Awesome news! Congratulations πŸ˜„ I think it makes most sense for these to be under two different repositories. But it would be cool to have them under a single organisation (I've already created https://github.com/Lel-Language and transferred this repo there). If you're interested we can set it up so that you administer the python Lel implementation through the organisation?

osaatcioglu commented 6 years ago

Great idea. I will update my repository to have only the Python implementation and also I will rename it to pylel and then I will move it to the organization.

Also, I am thinking that, by having an organization, we could also move the examples and the syntax to a different repository to have a better structure.

francisrstokes commented 6 years ago

Great idea. Makes sense since they should work uniformly for whichever version of Lel you're running

osaatcioglu commented 6 years ago

Cool, we can work on this together. We can even convert the docs to a gh-pages.

Btw, I got the following error when doing the transfer even though I renamed the repo to pylel. I guess, the original name is retained to redirect even when it is tranferred.

Lel-Language already has a repository in the Lel-Language/Lisp-esque-language network