Bahasa Manis (BM)
Bahasa pemrograman berbahasa Indonesia dengan interpreter, transpiler, CLI, dan playground web.
PyPI: https://pypi.org/project/bahasamanis/
Instalasi
Disarankan menggunakan pipx (CLI terisolasi dan langsung tersedia di PATH):
pipx ensurepath
pipx install bahasamanis
Alternatif (pip + virtualenv):
python -m venv .venv
.\.venv\Scripts\Activate.ps1 # Windows PowerShell
pip install bahasamanis
Instalasi dari sumber (pengembangan):
pip install -e .
Perintah CLI:
bm run|jalankan file.bmbm transpile|ubah file.bm -o file.pybm repl
Playground Web
python server.py
# buka http://127.0.0.1:5000
Quickstart
cetak "Masukkan nama:"
baca nama
cetak "Halo, {nama}!"
Jalankan:
bm jalankan hello.bm
# atau
bm run hello.bm
Fitur Bahasa Singkat
- Kata kunci:
cetak,baca,jika/elif/lain/akhir,selama,untuk,fungsi/kembali,lanjut/henti - Boolean:
benar,salah - Operator logika:
dan,atau,tidak - Interpolasi string:
"Halo, {nama}"(ekspresi di dalam{...}aman & didukung)
Interop Python & Modul BM (paket/pakai)
-
Impor modul Python dengan alias Indonesia:
paket "math" sebagai m cetak "akar 16 = {m.sqrt(16)}" -
Impor modul BM lokal atau pustaka standar berbahasa Indonesia:
pakai "bm_standar/json" sebagai j data = {"nama": "BM", "versi": 1} cetak j.bentuk(data, rapi=benar)
Catatan: Paket bahasamanis menyertakan data paket bahasamanis_data yang berisi folder bm_standar/, sehingga contoh di atas berfungsi langsung setelah instal dari PyPI (tanpa perlu menyalin file .bm secara manual).
Pustaka Standar BM
Paket bahasamanis menyertakan pustaka standar BM yang dapat diimpor menggunakan perintah pakai. Pustaka standar ini termasuk:
bm_standar/json: modul untuk bekerja dengan data JSONbm_standar/jaringan: modul untuk bekerja dengan jaringanbm_standar/waktu: modul untuk bekerja dengan waktubm_standar/acak: modul untuk bekerja dengan bilangan acak
Transpile -> Python
String dengan {...} ditranspilasi menjadi f-string Python.
# BM
cetak "Halo, {1+2}"
# Python
print(f"Halo, {1+2}")
Error Berbahasa Indonesia
Pesan kesalahan telah dilokalkan, misalnya:
Kesalahan sintaks pada ekspresi ...: tidak ditutupKesalahan runtime pada baris N: operator '>' tidak didukung antara tipe 'str' dan 'int'
VS Code Extension (lokal)
Folder: vscode-bahasamanis/
Cara coba:
- Buka folder
vscode-bahasamanis/di VS Code. - Tekan
F5untuk menjalankan Extension Development Host. - Buka file
.bmuntuk melihat highlight dan snippet.
Windows EXE
Rilis menyediakan binary tunggal bm.exe di halaman Release GitHub. Unduh bm.exe, lalu jalankan:
bm.exe jalankan contoh.bm
Changelog ringkas
0.1.11
- Interop Python:
paket "modul" sebagai alias - Import modul BM:
pakai "path/modul.bm" [sebagai alias] - CLI Indonesia:
bm jalankan,bm ubah,bm repl(kompatibel denganrun/transpile) - Pustaka standar dibundel:
bm_standar/{berkas,json,jaringan,waktu,acak}via paket databahasamanis_data - Perbaikan runtime: output
printdi-flush, resolusipakailebih kuat, default argumen fungsi dievaluasi saat pemanggilan
Lisensi
MIT
Metadata
Release files for bahasamanis 0.1.11.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bahasamanis-0.1.11.post1.tar.gz | 12.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bahasamanis-0.1.11.post1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.4 kB
Release files / bahasamanis-0.1.11.post1.tar.gz
| Download URL | bahasamanis-0.1.11.post1.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7241c5e75c48cdd3be7fa984cd2e3fd9202d0f0d720e7d0fea185fb05f9e0d3
|
|
BLAKE2b-256 checksum How to use checksums |
6b3c8763ad23631ea751bc4902e32535452e6b7bc9739ade96219a8f494419c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / bahasamanis-0.1.11.post1-py3-none-any.whl
| Download URL | bahasamanis-0.1.11.post1-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83d981c23bd20b1065edebbad2e29126cc14fb3ba85a53cc5ea042569d4a38df
|
|
BLAKE2b-256 checksum How to use checksums |
f71682a4a8b30d31e6e9ccb2e607bf5fea05079a7d6cfb05b0358e804453608a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for bahasamanis 0.1.11.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.