(You can try it live at https://junklangweb.netlify.app/)
JunkLang is a junk food-themed esoteric programming language where your code tastes as good as it runs. Inspired by BhaiLang and other meme langs, I won't mind if you call this a piece of junk!
ordervariables andeatexpressions- Arithmetic operations
whisperto printreheat:to define functions,deliver()to callif you like...else:conditionalsuntil thirsty <condition>loops- Input with
open your mouth and say - Custom errors with
barf("message") - CLI interpreter (
junklang program.jnk)
You can install it globally via pip:
pip install junklangNow you can run .jnk files using:
junklang <yourfile>.jnkopen your mouth and say burgers
order fries = 5
order meal = eat burgers + fries
whisper "You ordered a meal of " + meal
if you like meal more than 5:
whisper "That's a big meal!"
else:
whisper "That’s a light snack."
done
order total = 0
until thirsty total < 3:
order total = eat total + 1
whisper "Nom #" + total
done
reheat: make_burger
order patty = 1
order bun = 2
order burger = eat patty + bun
done
order my_burger = deliver(make_burger)
whisper "I got a burger with " + my_burger + " parts"
barf("No more food for you!")
order x = 5
order y = eat x + 10
Supports +, -, *, / inside eat expressions.
whisper "Hello World"
whisper "Value is: " + x
open your mouth and say name
if you like x more than 5:
whisper "x is big"
else:
whisper "x is small"
done
until thirsty counter < 10:
whisper counter
order counter = eat counter + 1
done
reheat: cook
order x = 1
order y = 2
order z = eat x + y
done
order result = deliver(cook)
barf("Something went wrong!")
junklang hello.jnkgit clone https://github.com/abc-is-here/junkLangWeb.git
cd junklang
pip install .This language is written in Python and is intended more for learning and fun than performance.