Make a Number Expression is related : actually, it is also about Aheui. But it just made number expression, but this made real Aheui code.
Aheui is esolang written in only Korean character. Because of its nature, Aheui can't use Arabic numbers.
But, of course, there is way to generate number.
Brief introduction to Aheui
Reading the link above is best, but put it shortly : Aheui is befunge-like esolang : have cursor, every character is instructor, and using stack.
One instructor, looks like
박, have three part : Initial consonant
ㅏ, final consonant
First part, initial consonant, determine what to do.
Here is table of initial consonant that can be useful here:
ㅇ: no operation.
ㄷ: pop two number from current stack, than add them, and push to current stack.
ㄸ: same as
ㄷ, but multiply instead of add.
ㄴ: pop two number from current stack, push
second // firstto current stack.
ㅌ: same as
ㄴ, but subtract instead of divide.
ㄹ: same as
ㄴ, but modulo instead of divide.
ㅂ: push number to current stack. Number is given by final consonant.
ㅃ: duplicate top of current stack.
ㅍ: swap top two value of current stack.
Second part, vowel, determine momentum. Maybe you just need
ㅏ, go to next.
Last part, final consonant, determine number to used in
Here is list of final consonant and number.
망 is printing operator. Your code have to print
망하 or whatever after calculation, to print and terminate the program.
Every Aheui instructor is Korean character.
As I mentioned above, Korean character has three part : Initial consonant(
중성), Final consonant(
Every character has initial consonant and vowel, but final consonant is option.
Korean character in Unicode is from
For composing Korean character, look at this webpage for help.
Input is an positive integer. Generate aheui code that prints given integer, without hardcode every possibility.
You can test your Aheui code at try it online.
Input | Output | Discription 1 | 반밧나망희 | Put two 2s in stack, divide, print, and halt. 1 | 반반나망희 | Same as above. 1 | 밪반타망희 | Put 3 then 2 in stack, subtract, print, and halt. 3 | 받망희 | Put 3 in stack, print, halt. 3 | 반밧나빠빠다다망희 | Put two 2s in stack, divide, duplicate two times, add two times, print, halt. This is OK, but won't get good point. 72 | 밢밣따망희 | Put 8 and 9 in stack, multiply, print, and halt. 10 | 박밙따망희 | Put 2 and 5 in stack, multiply, print, and halt.
Average length of 101 Aheui codes that prints 100 to 200. If score is same, shorter code wins.