Skip to main content

A Filipino-flavored programming language.

Project description

Alak

Alak is a fun, Tagalog-inspired esolang designed for learning and laughs. It uses Filipino "inuman" terms as syntax.


Getting Started

To install type:

pip install alak

Usage

alak init # Creates hello.alak
alak repl # Launches interactive REPL shell
alak run hello.alak # Runs the program
alak --version # Outputs: alak version 0.1.0

Supported Features in AlakLang

🔹 Variable Declaration Use alak to declare and initialize a variable:

alak x = 5;
alak y = 10;

You can also use Boolean values:

alak sanMigApple = walangTama; // false
alak alfonsoBrandy = myTama;   // true
  • Use tungga to print expressions or strings (with variable interpolation):
tungga x;
tungga "Total ay {x}";

🔹 Comments Alak supports c-style comment:

// Ito ay comment pare!

🔹 If Statement Use kung, tagay, and bitaw for conditional logic:

kung (x < y) tagay
    tungga "{x} pesos ay kaunti sa ambag na {y}";
bitaw

🔹 While Loop Use ikot, tagay, and bitaw for looping:

ikot (x < 10) tagay
    tungga x;
    alak x = x + 1;
bitaw

🔹 Function Definition & Calling Use inom to define a function and call it like normal:

inom ginebra(a, b) tagay
    alak sum = a + b;
    tungga "Total ng tinagay ng tropa ay {sum}";
bitaw

ginebra(3, 5);

🔹 Arrays & Indexing Declare arrays using square brackets [] and access elements using indices:

alak tropa = ["Mark", "Leetz", "Leo"];
tungga tropa[0];
tungga tropa[1];
  • Tagay-style For Loop: hangOver
hangOver alak i = 0; i < 3; i = i + 1 tagay
    tungga "Shot #{i}";
bitaw
  • Input from User with ambag()
alak pare = ambag("Sino nag ambag? ");
tungga "Salamat {pare}!";
  • Built in functions
alak word = "alak";
alak length = haba(word);
tungga "Haba ng '{word}' ay {length}";

alak name = "leetz";
alak shout = taasTagay(name);
tungga "Tagay kay {shout}!";

alak tropa = ["leetz", "mark"];
alak x = "joseph";

tropa.nahilo(x);      // append "joseph" to array
tungga "{tropa[2]} ay bagong tropa!";   // joseph ay bagong tropa!


// lagok
alak shot = lagok(1, 5);
alak inumin = ["GSM", "Empe", "SanMig"];
alak randomInom = lagok(inumin);
tungga "Tinagay ay {randomInom}, dami: {shot}"; // Tinagay ay ['GSM', 'Empe', 'SanMig'], dami: 1.0
  • Exit Program with patayNa()
tungga "Lasing na, uwian na!";
patayNa();

REPL Example

You can test single lines of Alak code interactively using the REPL:

alak repl

output:

alak> alak a = 3;
alak> alak b = 5;
alak> tungga a + b;
8.0
alak> exit

New Keywords (Under development)

  • May hangover pa ako, pero gagawin ko pa ito pare!!!
  1. balikTagay Return Statements
inom add(a, b) tagay
    balikTagay a + b;
bitaw

alak nahilo = add(3, 5);
tungga nahilo;
  1. Error Handling with sukaException
try tagay
    alak x = 5 / 0;
bitaw sukaException
    tungga "Sumuka si tropa. Walang division by sero, pare!";
bitaw
  1. Call Functions with kalabit
inom paShot() tagay
    tungga "Kampay!";
bitaw

kalabit paShot;

License

MIT License. Feel free to use and modify.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alak-0.1.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alak-0.1.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file alak-0.1.2.tar.gz.

File metadata

  • Download URL: alak-0.1.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for alak-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fe056319becef5d741be67c5330eaaacc8a929efc1763f3c8570d7bc67bef91e
MD5 e3d084f8ad79e0d1eb3bfdc863bfffa5
BLAKE2b-256 f20b846149cda358ad0a6b544ae9eadf654e7dadf24cfc65869cb0b7d3e32c5a

See more details on using hashes here.

File details

Details for the file alak-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: alak-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for alak-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a7bf7d39e40150fbdcf86e1c5bbf9d47437ae67a0b07f7270f382b92b192b0a6
MD5 7956c6ad6dbef2df52517a9f564adca1
BLAKE2b-256 cb5e16d2b638ae08fbf0842f6e75cc599522887e2a241239515832df4c9e7041

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page