A Programming Language for those who "Dare to be stupid"
Welcome to YankoviC, the most ridiculously awesome programming language inspired by the legendary "Weird Al" Yankovic! YankoviC combines the power of structured programming with the whimsy of polka music and the humor of the world's greatest musical parodist.
- Complete CLI and IDE - Full development environment with AI assistant
- Graphics Programming - UHF graphics library with animations and games
- Web Development - Like_a_Server library with real HTTP server functionality
- Math Library - Comprehensive Albuquerque math functions
- File Management - Project structure with examples and documentation
- Cross-Platform - Works on Windows, macOS, and Linux
- π΅ YankoviC Programming Language v1.1.0
// Your first YankoviC program
spatula want_a_new_duck() {
perform_a_parody("Welcome to YankoviC! Dare to be stupid!\n");
twinkie_wiener_sandwich 27;
}
- Node.js 18+
- npm or yarn
Git may lock your access to the code / folders in the project! In that case you must download the ZIP manually instead of running git clone
Run the following command to install all dependencies, set up the environment, and add YankoviC to your PATH for global CLI use:
./install.sh
This installer only works for Linux (Maybe MacOS idk), windows users will have to open it up and do it all manually
./uninstall.sh
You can run the accordion anywhere!
yankovic --accordion
You can now run YankoviC programs globally using:
yankovic program.yc
If you need to figure out something with YankoviC, use the help command!
yankovic --help
The examples folder has plenty of examples, but if you want to see the full power of YankoviC, run this!
yankovic --demo
YankoviC now includes a complete web development stack:
#eat like_a_server.hat
spatula want_a_new_duck() {
// Start a real HTTP server
amish_barn_raising(3000);
// Set up routes
amish_buggy_trail_get("/", "welcome_page");
amish_barn_delivery_post("/api/data", "handle_data");
// Keep server running
polka (its_a_fact) {
jeopardy (amish_barn_still_standing()) {
wait_for_a_moment(1000);
}
}
twinkie_wiener_sandwich 27;
}
Real HTTP Server Features:
- β GET, POST, PUT, DELETE routes
- β JSON and HTML responses
- β CORS support
- β Middleware/helpers
- β Session management
- β Database operations
#eat UHF.hat
spatula want_a_new_duck() {
start_the_show(800, 600, "My Game");
polka (!the_shows_over()) {
roll_the_camera();
// Draw animated graphics
pick_a_hawaiian_shirt(AL_RED);
draw_a_spamsicle(100, 100, 50, 50);
// NEW: Display images and play media
fat_frame("al.jpeg", 200, 100, 400, 400);
Lossless_Laughter("background_music.mp3", "audio");
that_is_a_wrap();
}
twinkie_wiener_sandwich 27;
}
- Global Installation:
yankovic program.yc
works anywhere - Better Error Messages: More helpful debugging information
- Cross-Platform: Works on Windows, macOS, and Linux
- Graphics Modes: PNG export, Electron windows, ASCII art, headless
YankoviC/
βββ π README.md # Main documentation
βββ π WORDS.md # Complete language reference
βββ π UHF_CHANNELS.md # Graphics mode documentation
βββ π§ install.sh # Automated installer
βββ π yankovic # Global CLI command
βββ π backend/ # Backend server
βββ π frontend/ # Web IDE interface
βββ π electron/ # Desktop app components
βββ π examples/ # Working example programs
βββ like_a_server/ # β
Web server examples
βββ weird_wide_web/ # β
Client-side web development
βββ uhf_graphics/ # β
Graphics programming
βββ albuquerque_math/ # β
Mathematics examples
βββ basic/ # β
Language fundamentals
-
β Web Server: Real HTTP server with routes and endpoints
-
β Graphics: Animations, games, and interactive UIs
-
β Math: Complex calculations and algorithms
-
β Basic: Core language features and syntax
-
β Web Development: Client-side page generation
-
β Multimedia: Image display and audio/video playback
-
Improved CLI Output Handling: The
cli_output
folder is now only created in PNG mode. -
Updated Web Server Example: The
amish_web_server.ycw
example now uses apolka
loop to keep the server running. -
Streamlined Installation: The
install.sh
script now handles all setup steps, including adding YankoviC to the PATH.
Every YankoviC program must have a main function called want_a_new_duck
:
spatula want_a_new_duck() {
// Your code here
twinkie_wiener_sandwich 27; // Return success
}
YankoviC uses Weird Al-themed data types:
Type | Description | Example |
---|---|---|
spatula |
Integer numbers | spatula count = 42; |
lasagna |
Floating-point numbers | lasagna price = 3.14; |
lyric |
Single character | lyric grade = 'A'; |
verse |
Text strings | verse song = "Eat It"; |
horoscope |
Boolean values | horoscope is_weird = its_a_fact; |
accordion_solo |
Arrays/collections | accordion_solo items; |
Boolean Values:
its_a_fact
= truetotal_baloney
= false
// Mutable variables
spatula age = 25;
verse name = "Alfred";
// Immutable variables (constants)
stupid spatula MAX_POLKAS = 100;
stupid verse ALBUM_NAME = "Dare to be Stupid";
// Function with return type and parameters
verse make_parody(verse original, spatula intensity) {
verse result = "βͺ " + original + " βͺ";
twinkie_wiener_sandwich result;
}
// Function call
spatula want_a_new_duck() {
verse my_song = make_parody("Beat It", 11);
perform_a_parody("New song: %verse\\n", my_song);
twinkie_wiener_sandwich 27;
}
If Statements (Jeopardy):
jeopardy (age >= 18) {
perform_a_parody("You're an adult!\\n");
} another_one {
perform_a_parody("Still a kid!\\n");
}
For Loops (Hardware Store):
hardware_store (spatula i = 0; i < 10; i = i + 1) {
perform_a_parody("Count: %spatula\\n", i);
}
Game Loops (Polka):
// Frame-based animation loop
polka (!the_shows_over()) {
roll_the_camera();
// Draw stuff here
that_is_a_wrap();
}
// Single-line comments
/* Multi-line
comments */
// Comments can appear anywhere, even above import statements!
// This is totally fine:
#eat "my_library.hat"
Operator | Description | Example |
---|---|---|
+ - * / % |
Arithmetic | result = a + b * c % d; |
== != < > <= >= |
Comparison | jeopardy (x == 42) |
&& ! |
Logical | jeopardy (x > 0 && y < 10) |
= |
Assignment | x = 5; |
Import with: #eat <UHF.hat>
Window Management:
start_the_show(800, 600, "My Awesome Window"); // Create window
cancel_the_show(); // Close window
horoscope over = the_shows_over(); // Check if window closed
Drawing Functions:
roll_the_camera(); // Start new frame
paint_the_set(YELLOW_MUSTARD); // Set background color
pick_a_hawaiian_shirt(ORANGE_CHEESE); // Set draw color
draw_a_big_ol_wheel_of_cheese(x, y, radius); // Draw circle
draw_a_spamsicle(x, y, width, height); // Draw rectangle
that_is_a_wrap(); // End frame
Built-in Colors:
YELLOW_MUSTARD
- Classic yellowORANGE_CHEESE
- Bright orangeTWINKIE_GOLD
- Golden yellowSKY_BLUE_FOR_YOU
- Light blue
Animation Loop:
#eat <UHF.hat>
spatula want_a_new_duck() {
start_the_show(800, 600, "Bouncing Ball");
set_polka_speed(60); // 60 FPS
spatula x = 100;
spatula dx = 5;
polka (!the_shows_over()) {
roll_the_camera();
paint_the_set(SKY_BLUE_FOR_YOU);
pick_a_hawaiian_shirt(ORANGE_CHEESE);
draw_a_big_ol_wheel_of_cheese(x, 300, 50);
x = x + dx;
jeopardy (x > 750 || x < 50) {
dx = -dx;
}
that_is_a_wrap();
}
twinkie_wiener_sandwich 27;
}
Note on 3D Support: Currently, UHF only supports 2D rendering. 3D support might be added in future versions if there's demand!
Import with: #eat <albuquerque.hat>
Functions:
spatula random_spatula(); // Random number 0-99
lasagna sin(lasagna angle); // Sine function
lasagna cos(lasagna angle); // Cosine function
spatula yoda(spatula a, spatula b); // Modulus operation (remainder)
// More functions coming in future versions!
Hat files are YankoviC's library format.
// my_utilities.hat
on_the_menu verse make_joke(verse setup) {
verse punchline = setup + "... NOT!";
twinkie_wiener_sandwich punchline;
}
private_stash spatula secret_number() {
twinkie_wiener_sandwich 42; // Only visible within this file
}
#eat <UHF.hat> // Built-in library
#eat "lib/my_utilities.hat" // Custom library from the projects folder
#eat "./helpers/math_stuff.hat" // Relative path
on_the_menu
- Public functions (exported)private_stash
- Private functions (internal only)
// In a .hat file:
on_the_menu verse public_function() {
twinkie_wiener_sandwich "Everyone can use this!";
}
private_stash verse internal_helper() {
twinkie_wiener_sandwich "Only this file can use this";
}
The Accordion IDE provides a complete development environment for YankoviC programming.
- π Create folders: Right-click β "New Folder"
- π Create files: Right-click β "New File"
- ποΈ Delete items: Click the delete button (with confirmation)
- π Refresh: Auto-refreshes when files change
- π Browse projects: Navigate through your YankoviC projects
- Syntax highlighting for YankoviC keywords
- Auto-save functionality
- Error highlighting for syntax issues
- Multi-file editing with tabs
- Program output from
perform_a_parody()
calls - Error messages with helpful details
- Execution status with exit codes
- Interactive feedback for running programs
- Code help and suggestions
- Tab Autocomplete using pollinations, so you can code with ease
- Syntax explanations
- Debugging assistance with the Al-manac
- Best practices recommendations
UHF (Ultra High Frequency) is YankoviC's graphics library, inspired by Weird Al's movie "UHF". Here's a complete graphics program:
#eat <UHF.hat>
spatula want_a_new_duck() {
// Create a window
start_the_show(800, 600, "Weird Al's Graphic Adventure");
set_polka_speed(30); // 30 FPS
spatula frame_count = 0;
polka (!the_shows_over()) {
roll_the_camera();
// Animated background
paint_the_set(TWINKIE_GOLD);
// Draw spinning cheese wheels
spatula angle = frame_count * 5;
spatula center_x = 400;
spatula center_y = 300;
hardware_store (spatula i = 0; i < 8; i = i + 1) {
spatula x = center_x + cos(angle + i * 45) * 150;
spatula y = center_y + sin(angle + i * 45) * 150;
pick_a_hawaiian_shirt(ORANGE_CHEESE);
draw_a_big_ol_wheel_of_cheese(x, y, 30);
}
frame_count = frame_count + 1;
that_is_a_wrap();
}
twinkie_wiener_sandwich 27;
}
spatula want_a_new_duck() {
perform_a_parody("Hello, Weird World!\\n\\nDare to be stupid!");
twinkie_wiener_sandwich 27;
}
#eat "lib/random_helpers.hat"
spatula want_a_new_duck() {
verse numbers = generate_random_list(5, 1, 100);
perform_a_parody("Random numbers: %verse\\n", numbers);
twinkie_wiener_sandwich 27;
}
#eat <UHF.hat>
spatula want_a_new_duck() {
start_the_show(400, 300, "Polka Dots");
set_polka_speed(60);
spatula dot_x = 200;
spatula dot_y = 150;
polka (!the_shows_over()) {
roll_the_camera();
paint_the_set(SKY_BLUE_FOR_YOU);
pick_a_hawaiian_shirt(YELLOW_MUSTARD);
draw_a_big_ol_wheel_of_cheese(dot_x, dot_y, 25);
// Move the dot randomly
dot_x = dot_x + (random_spatula() % 21) - 10;
dot_y = dot_y + (random_spatula() % 21) - 10;
// Keep dot on screen
jeopardy (dot_x < 25) dot_x = 25;
jeopardy (dot_x > 375) dot_x = 375;
jeopardy (dot_y < 25) dot_y = 25;
jeopardy (dot_y > 275) dot_y = 275;
that_is_a_wrap();
}
twinkie_wiener_sandwich 27;
}
This is a list for things that I need to do, but feel free to open a PR with the feature!
Feature | Description | Why |
---|---|---|
Reverse Interpeter | Converting Javascript, HTML, CSS, and Python files to YankoviC | Why not port everything to YankoviC? |
Try / Except | Add Try / Except with do_i_creep_you_out and catching with creeped_out |
Everything has to work, so a lot of conditionals fail |
Sleep | Add a stop_forwarding_that_crap to waste time |
You will need to have delays eventually |
Async | Add saga_begins to start an async, awaited with something |
You need async and synchronous stuff |
More I am sure | I am tired, feel free to add whatever you want. | If it is Weird Al inspired I will probably merge. |