Difference between revisions of "Language/Multiple-languages/Culture/Numeration-Tutorial"
Line 12: | Line 12: | ||
https://insights.stackoverflow.com/survey/2020#technology-most-loved-dreaded-and-wanted-languages-loved | https://insights.stackoverflow.com/survey/2020#technology-most-loved-dreaded-and-wanted-languages-loved | ||
Why not Rust or TypeScript, but Python? Well, because Python has a lot of scientific libraries, so it | Why not Rust or TypeScript, but Python? Well, because Python has a lot of scientific libraries, so it is more relevant to my main area of study. Its code is very easy to maintain, which is another important factor for the choice. | ||
<youtube>_uQrJ0TkZlc</youtube> | <youtube>_uQrJ0TkZlc</youtube> | ||
Line 20: | Line 20: | ||
https://www.zionandzion.com/json-vs-xml-vs-toml-vs-cson-vs-yaml/ | https://www.zionandzion.com/json-vs-xml-vs-toml-vs-cson-vs-yaml/ | ||
And why not JSON or TOML, but YAML? Because YAML | And why not JSON or TOML, but YAML? Because YAML has high readability and is very easy to maintain (at least no need to type soo many quotation marks). | ||
<youtube>cdLNKUoMc6c</youtube> | <youtube>cdLNKUoMc6c</youtube> |
Revision as of 11:25, 2 October 2020
Finally, the aleph version of Numeration is released! You can practise some Esperanto numerals now!
Address: https://gitlab.com/GrimPixel/Numeration
It is a program to help people to practise reading, writing (hopefully also listening to and speaking) numbers, written in Python and YAML.
It would be ridiculous to post this tutorial on GitLab, because this tutorial's target readers are non-programmers, so it is too detailed for programmers.
What are Python and YAML and why choose them?
Python is one of the most beloved languages:
Why not Rust or TypeScript, but Python? Well, because Python has a lot of scientific libraries, so it is more relevant to my main area of study. Its code is very easy to maintain, which is another important factor for the choice.
Yaml is one of the most beloved data serialization formats:
https://www.zionandzion.com/json-vs-xml-vs-toml-vs-cson-vs-yaml/
And why not JSON or TOML, but YAML? Because YAML has high readability and is very easy to maintain (at least no need to type soo many quotation marks).
How to get started with Numeration?
Download the newest Python, so you can run Python programs; download an integrated development environment (IDE) so you have a graphical user interface (GUI) to edit the code or run the program in source code:
https://www.python.org/downloads/
https://www.jetbrains.com/pycharm/download/
Then download Python's YAML parser “ruamel.yaml”, so that Python interpreter can understand YAML format. If you are using Windows, tap WinKey, input "cmd", tap Enter, copy the line starting with "pip" in the following webpage, paste into the command line window, tap Enter. For users of other operating systems, you should already have known how to open the command line of your system, I suppose.
https://pypi.org/project/ruamel.yaml/
They are all open-source.
After doing this, go to that Address above. Download the source code (in fact, you just need 'rule/esperanto.py' and 'rule/dictionary/esperanto.yaml' for the time being. Keep the directory structure unchanged (i.e. don't move the yaml out of "dictionary" folder, otherwise you need to change the source code to run the program).
Open PyCharm, open the project directory, i.e. the "Numeration" folder, open esperanto.py.
On the upper-right corner, you can see that green run button. You need to specify the path to the esperanto.py on the left side of it. Click on the run button (or tap "Shift + F10") to run the program in the console.
If you are still confused about PyCharm, please watch the first sections of that Mosh's tutorial above.
What's the futural plan?
I need to add the features mentioned in 'about/content.yaml' for Esperanto, then add support to the other 4 languages mentioned in 'about/language.yaml, then I will start supporting other languages. Of course, I will find the common parts in different languages, create modules in 'rule/_common.py'. Maybe I can create a GUI with BeeWare after all of this. I need to accumulate experience through this project, then I can create other ones.