Hacker News new | ask | show | jobs
by gmurphy 1774 days ago
One night a few months ago, after two large beers I imagined up a domain name that was SO PERFECT that I HAD TO BUY IT and swore that this time, unlike all the others, I was TOTALLY GOING TO DO SOMETHING WITH IT.

The next morning, looking for an excuse to not get out of bed, I actually followed through:

https://haikupotamus.com/

4 comments

Your website adds an entry to the history on every keystroke. You might want to fix that (use window.history.replaceState instead of window.history.pushState).
Neat idea, two thoughts:

On mobile, it completely breaks the back button. I had to swipe about 50 times and watch it letter by letter to get back here.

Secondly, what's the data source? I just tested 'segue' which counted as 1, which makes me think it's guessing instead of like, a word map. Just curious now.

It does a client-side guess based on vowels, and then hits the server for an authoritative version. The server has a word:syllables map I derived from the CMU Pronouncing Dictionary.

In the "segue" case, it looks like the dictionary lists two pronounciations, one as 'seg', so it uses the lesser of the two. Not sure that pronounciation is valid, though.

Thanks to you and frosted-flakes, I pushed a fix for the back button issue - good catch, I appreciate it.

Oh wow this is great I have always wanted to Learn to write haikus