ꌹꌎ
sawa (ꌹꌎ) is an open source programming language, an interpreter to be precise, where you can write Python code using Javanese character.
sawa iku aranÊ program iki sing ndadèkakÊ awakmu bisa kodhing Python nganggo aksara Jawa.
- Hello world
ꌼꌿꌜꌤę§("ꌹꌸęŚęŚźęŚęŚŤęŚŽęŚ¸ęŚ")
Output:
ꌲꌸęŚęŚźęŚęŚŤęŚŽęŚ¸ęŚ
- Condition
ꌲ = ę§
ęŚŞęŚşęŚ¤ę§ ę§ == ę§:
ꌼꌿꌜꌤę§("ꌲ ęŚęŚşęŚ´ęŚąęŚşęŚ´ęŚ")
ęŚ˛ęŚ¸ęŚ ęŚŽęŚęŚśęŚŞęŚ¤ęŚş ꌲ%2 == ę§:
ꌼꌿꌜꌤę§("ꌲ ęŚęŚ¤ęŚźęŚĽę§")
ęŚęŚśęŚŞęŚ¤ęŚş:
ꌼꌿꌜꌤę§("ꌲ ęŚęŚę§ęŚęŚśęŚę§")
Output:
ꌲ ęŚęŚę§ęŚęŚśęŚę§
- Function
ꌼꌳꌸęŚęŚąęŚś ęŚ ęŚŠę§ęŚ§ęŚ(ꌲ,ꌧ):
ęŚ = ꌲ + ꌧ
ꌧęŚęŚśęŚę§ ęŚ
ꌼꌿꌜꌤę§("ęŚęŚ¸ęŚęŚęŚ¸ęŚ = ", ęŚ ęŚŠę§ęŚ§ęŚ(ę§,ę§))
Output:
ęŚęŚ¸ęŚęŚęŚ¸ęŚ = ę§
- Importing You may import Python package an rename it as Javanese name. For example:
ęŚęŚ¸ęŚĽęŚ¸ęŚę§ pandas ꌢꌢꌜ ꌼꌢ
ęŚęŚ¸ęŚĽęŚ¸ęŚę§ numpy ꌢꌢꌜ ꌤꌼ
ęŚ˘ęŚ = ꌼꌢ.read_csv('/location/of/csv/file.csv')
ꌢęŚ.head()
Prerequisites
- Mac OS, Linux, Windows
- Python 3
NOTE: Windows is still untested. Please use pip
version, and let me know if it's not working.
Getting Started
Installation
Build from scratch (for Mac OS and Linux)
PLEASE NOTE: You need root access for Linux operating system.
- Clone this repo:
git clone https://github.com/lantip/sawa.git
cd sawa
- Run install.sh:
./install.sh
- Or run Makefile:
make install
Uninstall
- Run uninstall.sh
./uninstall.sh
pip
(For all OS)
Using - Run Pip install:
pip install sawa
NOTE: WINDOWS user
Install this package on virtualenv
.
C:>python -m venv C:\Users\<name>\venv
C:>C:\Users\<name>\venv\Scripts\activate.bat
(venv)C:>pip install sawa
and you're good to go.
Running
-
Create a new file with name
ꌲęŚęŚŽ.ꌹꌎ
and open in any editor. -
Write this in the file
ꌼꌿꌜꌤę§("ꌹꌸęŚęŚźęŚęŚąęŚśęŚŞęŚ")
-
Save it
-
Open a terminal and go to the folder where file is saved
-
Run this command
ꌹꌎ ꌲęŚęŚŽ.ꌹꌎ
- It will print
ꌹꌸęŚęŚźęŚęŚąęŚśęŚŞęŚ
Contributing
You are most welcome to contribute for sawa. For guidelines see CONTRIBUTING.md
To get started take a fork of this repository and clone it.
Credits
This interpreter is build heavily based on YaLang skeleton. Thank you!