"A language where code must be poetry. Literal haikus."
Ku-Lang is an esoteric programming language where every program must be written in haiku format (5-7-5 syllables), combining poetic beauty with code through features like rhyme detection, palindrome magic, and natural language arithmetic.
"In Japanese, ku (句) literally means "verse" - the exact term used for lines in a haiku."
Syllable Validation: Each line must follow strict 5-7-5 syllable counting
Variable Memory System: Store values using "remembers" and "echo" patterns
Natural Language Arithmetic: Perform math with English words (one plus five)
Conditional Execution: Use "if greater" to control program flow
Loop Constructs: "count from" creates iterative word consumption
Function Definition & Calling: "summon" creates functions, "call the" executes them
Rhyme Detection Algorithm: Automatically detects rhyming lines and doubles values
Palindrome Word Detection: Finds palindromic words and reverses entire haikus
English Word Validation: Ensures all words exist in comprehensive dictionary
Haiku Fusion System: Combines summoned and calling haikus into new poems
Error Handling: Provides descriptive error messages with line numbers
Visual Feedback: Shows syllable counts, iteration progress, and special effects
Get ku-lang running in minutes on your machine!
◦ Option 1: Install globally (recommended)
npm install -g ku-lang
Note: On macOS/Linux, you may need to use sudo npm install -g ku-lang
if you get permission errors.
◦ Option 2: Clone and install locally
git clone https://github.com/NewSmoke38/ku-lang
cd ku-lang
npm install
npm link
Note: You might need sudo npm link
on macOS/Linux if you get permission errors.
Create a file hello.ku
:
value remembers
five plus five is the answer
echo value now
Run it:
ku hello.ku
Verify CLI installation:
ku --version
ku --help
Creating ku-lang taught me that programming languages are more than just about writing the correct syntax. I learned how to make a rigid 5-7-5 haiku structure work, where every line must be both functional and beautiful. Now i understand what an interpreter really does, from syllable counting of haikus to palindrome detection and rhyme analysis (its really cool btw). i leanred how to publish my own CLI on npm,yaayy! Even lines left empty between code blocks are to be specified so that the code doesnt crash lol. also comment functionality is a thing which i never gave attention to!! It was a great journey!!!
Read my notion Doc on how i made it! (coming soon)
Contributions are welcomed to ku-lang!
Hop onto the "Try it" section and run it on your machine!
Every contribution, no matter how small, helps make ku-lang more beautiful! 🌸
❝ 言語の美学 ❞
この言語では:
・それぞれの俳句の行には目的がある
・リズムは見せかけではなく、構造である
・意味は形式からではなく、言葉による機能から生まれる
他のものが詩を真似るなら、
この言語は詩に計算させる。
装飾ではなく、ただの動作。