mommyscript
v1.0.1
Published
A meme programming language with mommy/ASMR-flavored syntax π
Maintainers
Readme
MommyScript π
A meme programming language for good boys and good girls everywhere~
"Shhh... mommy will handle the compilation, darling~"
What is MommyScript?
MommyScript is a transpiled meme programming language that takes your cozy .mommy files and turns them into JavaScript. Every keyword is replaced with mommy/ASMR-inspired terms, type errors are whispered softly, and the entire Node.js ecosystem is available because mommy loves you too much to start from scratch.
Installation
npm install -g mommyscriptOr clone + link for development:
git clone https://github.com/radjashiqnals/mommyscript
cd mommyscript
npm linkπ VS Code Extension
For the best experience, install the official MommyScript VS Code Extension. It includes:
- Syntax highlighting
- Cute snippets (
tgb->task for my good boy) - Auto-closing brackets and strings
- The
shhh...comment toggle
Quick Start
Create a file called hello.mommy:
shhh... my first MommyScript program π
remember darling name = "World";
task for my good boy greet() {
whisper("Hello, " + name + "~ π");
}
greet();Run it:
mommy run hello.mommy
# Hello, World~ πCLI Commands
| Command | What it does |
|---|---|
| mommy run <file.mommy> | Transpile and execute |
| mommy check <file.mommy> | Soft type-check only |
| mommy peek <file.mommy> | Show generated JavaScript |
| mommy version | Version + ASCII art |
| mommy help | Usage info |
Language Reference
Variables
let mommy hold x = 42;
remember darling PI = 3.14159;Type Annotations (optional, soft)
let mommy hold name: sweetheart = "Alice";
remember darling count: number = 10;
let mommy hold flag: goodbool = yes mommy;
let mommy hold anything: anything = "whatever~";Types: sweetheart (string) Β· number Β· goodbool (boolean) Β· anything (escape hatch)
Type mismatches are whispered as warnings, not hard errors β mommy is gentle π
Functions
task for my good boy greet(name) {
whisper("Hello, " + name + "~");
}
task for my good girl add(a, b) {
come here a + b;
}Both task for my good boy and task for my good girl compile to function. Use whichever feels right! π
Booleans & Null
let mommy hold isHappy = yes mommy;
let mommy hold isSad = no mommy;
let mommy hold mystery = no darling;Conditionals
if mommy says (score > 90) {
whisper("Amazing, darling~ β¨");
} or maybe (score > 60) {
whisper("Good job! Keep going~ πͺ");
} otherwise {
whisper("It's okay sweetheart, we'll study together π₯Ί");
}Loops
shhh... while loop
let mommy hold i = 0;
cuddle (i < 5) {
whisper("cuddle #" + i);
i = i + 1;
}
shhh... for loop
for every good boy (let j = 0; j < 3; j++) {
whisper("step", j);
}Arrays (toybox)
let mommy hold treats = toybox["cookie", "milk", "hug"];
whisper(count(treats)); // 3
cuddleUp(treats, "bedtime story");
whisper(treats[0]); // cookieClasses (OOP)
snuggle Animal {
task for my good boy constructor(name) {
this.name = name;
}
task for my good boy speak() {
whisper(this.name + " says hello~");
}
}
snuggle Dog raised by Animal {
task for my good boy constructor(name) {
super(name);
}
task for my good boy speak() {
whisper(this.name + " says: woof! πΆ");
}
}
let mommy hold d = adopt new Dog("Biscuit");
d.speak();Async / Await
task for my good girl fetchData() {
promise mommy task for my good boy load() {
let mommy hold data = wait for mommy someAsyncThing();
come here data;
}
come here load();
}Comments
shhh... this is a single-line comment
/* sweet dreams
this is a
multi-line comment
wake up */Error Handling
task for my good boy riskyBusiness() {
try {
oopsie adopt new Error("oops!");
} mommy catches (err) {
whisper("mommy caught it:", err.message);
}
}Standard Library
| Function | Equivalent | Description |
|---|---|---|
| whisper(...args) | console.log | Soft output~ |
| scream(...args) | console.error | Mommy is upset π€ |
| smooch(n) | Math.abs(n) | A kiss makes negatives better |
| count(arr) | arr.length | Count your blessings |
| cuddleUp(arr, item) | arr.push(item) | Add to your toybox |
| nap(fn, ms) | setTimeout(fn, ms) | Mommy puts you to sleep |
| snuggleSort(arr, fn) | [...arr].sort(fn) | Sort with love |
| peek(arr, i) | arr[i] (supports negative) | Peek at an item |
| isEmpty(val) | checks empty | Is it empty, darling? |
Error Messages
MommyScript catches all Node.js runtime errors and rewraps them in soft mommy messaging:
π Oh darling, I think you mixed up your types~
[dim: TypeError message]
π₯Ί Sweetie, I can't find "foo" anywhere... did you forget to tell mommy?
[dim: ReferenceError message]
β¨ Hmm, mommy doesn't understand what you wrote here, let's fix it together~
[dim: SyntaxError message]
π³ Baby, that number is way too big for mommy to handle...
[dim: RangeError message]The String Trap (technical note)
MommyScript uses a segment-based transpiler rather than naive regex replacement. Source is first split into code segments and non-code segments (string literals + comments). Keyword substitution only runs on code segments, so this works perfectly:
whisper("I promise mommy I will behave!");
// β console.log("I promise mommy I will behave!");
// NOT: console.log("I async I will behave!"); β string trap avoided!Examples
See the examples/ directory:
hello.mommyβ Hello Worldloops.mommyβ FizzBuzz + toybox arraystypes.mommyβ Type annotationsclass.mommyβ OOP with snuggle/raised by/adopt newasync.mommyβ Async tea brewing π«
Contributing
Mommy welcomes all contributions, darling~ π
- Fork the repo
- Create your branch:
git checkout -b feat/my-little-feature - Write your changes with love
- Make sure
mommy run examples/hello.mommystill works - Open a PR and mommy will review it gently~
Please keep the meme energy high and the tone soft. No hard errors, only whispered warnings π₯Ί
Known Issues & Limitations
This is a meme project. Some things are broken on purpose. Some things are broken by accident. Mommy is sorry either way π₯Ί
| Issue | Status | Notes |
|---|---|---|
| Nested class bodies | β οΈ Partial | snuggle inside snuggle (nested classes) may incorrectly strip function from the wrong context. Mommy's depth tracker is simple. |
| Template literal substitution | β
Fixed | In version >= 1.0.1, keywords inside <backtick>${expr}</backtick> template literals are correctly processed. |
| mommy catches without try | β Will error | mommy catches must always follow a native try {. Mommy doesn't add the try for you. |
| bring friends / share with world | β οΈ Partial | ES module import/export syntax works in the transpiled output, but node --eval runs in CommonJS mode, so browser/ESM imports may not resolve. Use require() style interop for now. |
| Arrow functions | βΉοΈ Not sugared | Arrow functions (=>) have no MommyScript keyword. Just use raw => β mommy approves of concise syntax darling~ |
| Line numbers in errors | β οΈ Approximate | Error line numbers are estimated by subtracting the stdlib prelude line count (~55 lines). Off-by-a-few is expected. |
| No module system | βΉοΈ Pending | You can't bring friends from another .mommy file yet. Cross-file imports targeting .mommy sources are not supported. |
| Type checking is shallow | βΉοΈ By design | The type checker only catches literal mismatches at declaration time. Dynamic type errors are caught at runtime with mommy error messages. |
Vibe Coded With Love π
This project was 100% vibe coded β meaning the architecture, syntax design, implementation, and debugging were all done through AI pair programming sessions. No rubber duck was harmed.
Built using:
- π€ Claude Sonnet 4.6 (Thinking) β initial design, syntax bikeshedding, transpiler architecture
- π§ Gemini Pro 3.1 (Thinking) β implementation, bug fixes (including the class method
functionkeyword bug), and deployment
"The best programming languages are the ones that make you feel something. MommyScript makes you feel loved."
β probably someone on the internet
License
MIT β because mommy shares everything with her darlings π
