Go Home Go Back

Welcome to Project HaHa

Background:

While in class, a friend of mine kept texting me "hahaha." I then thought about a language (HaHa) where each "ha" corresponded to a letter in the Latin alphabet.

For example:
a = ha
b = haha
c = hahaha
ect...

This makes it easy to convert a word into HaHa. However, converting a HaHa string BACK into a Latin word becomes very complicated.

Specifically:
hahaha can be translated to:
aaa
ba
ab
c

The Question:

Given a string in HaHa, what possible Latin words can be created? For now, only enter one word at at time.
(To remove the need of a dictionary, just create all possible strings in Latin)

Why is this in JavaScript?
My host will shut off my box if the cpu is at 100% for more than 90 seconds - which can happen easily with large HaHa strings. Hint: Exponential.
I also wanted a way to have people easily send HaHa codes, but the time needed to generate possible Latin words is far too high.

Try my example!

Check out the faster C++ version here!

Type enter when done with a text input. This expects lower case single words with chars (a-z).

Convert Latin Word to HaHa:

HaHa String:


Convert HaHa to Latin Letters:

Note: Latin 'z' converted to HaHa produces 2^25 possible strings and will typically crash your browser

Possible Outputs:
(If nothing shows up right away it is because you probably entered a long HaHa string - this may take a long time to process)