Ahoy, fellow coders and One Piece fans!
Today, I'm thrilled to introduce a personal project that merges the world of programming with the spirit of the Grand Line β OnePiece Lang β
βIβm gonna become the king of the piratesβ¦ by compiling my code first!β
βοΈ What Is OnePiece Lang?
OnePiece Lang is a fun and creative domain-specific language (DSL) that lets you write pirate-flavored code β inspired by One Piece β and compiles it to regular JavaScript.
Itβs beginner-friendly, readable, and just quirky enough to make you smile while coding.
π§ Example
temporaryBounty bounty = 100
hasHaki (bounty > 50)
echoDenDen("High bounty!")
noHaki
echoDenDen("Low bounty")
DockAtHarbor
β¬οΈ Compiles to:
let bounty = 100;
if (bounty > 50) {
console.log("High bounty!");
} else {
console.log("Low bounty");
}
π§ Live Playground
You can try OnePiece Lang right now in your browser:
- βοΈ Write
.onepiece
code - βοΈ Compile to JavaScript
- π£ See console output β live!
π¦ Available on NPM
Want to use it locally in your projects?
npm install -g onepiece-lang
Then create a .onepiece
file and run:
onepiece run yourfile.onepiece
π¦ NPM package: https://www.npmjs.com/package/onepiece-lang
πΊοΈ Language Features
Pirate Phrase | JavaScript Equivalent |
---|---|
temporaryBounty |
let |
eternalPose |
const |
hasHaki |
if |
noHaki |
else |
DockAtHarbor |
} |
untilLaughTale |
while |
sailThrough |
for |
crewSkill |
function |
claimTreasure |
return |
echoDenDen(...) |
console.log(...) |
abandonShip |
break |
keepSailing |
continue |
π Project Links
- π» GitHub Repo: OnePiece_Lang on GitHub
- π Live Playground: onepiecelang.netlify.app
- π¦ NPM Package: onepiece-lang
- πββοΈ Me: @DeeapakSarun on GitHub | LinkedIn
β€οΈ Built for Fun and Learning
This project is purely a fan-made tool to celebrate the joy of One Piece and make learning programming more engaging.
One Piece and its characters are the property of Eiichiro Oda and Toei Animation.
This is a non-commercial, educational project.
π Join the Crew
If you love:
- Anime
- JavaScript
- Creative coding projects
...then join the crew! π΄ββ οΈ
- Star the repo β
- Try out the playground π
- Share feedback or contribute!
Letβs make programming fun β one bounty at a time!
Top comments (0)