Neat. I thought for a moment it was just a script embedded in a TXT record, but you do communicate over DNS with a server-side implementation of the game. The perl bit is just to unescape the response.
It uses a custom DNS server that returns the result as a TXT record for the domain <your guess>.wd.ip.wtf. You don't need to point directly at that server as it's registered as the nameserver for that domain.
I see where you're coming from on 5 unique letters but have a strong preference the other way. The possibility of double letters adds a lot of interest to the game for me. But I can see how someone would find it annoying too.
I'm curious about the singular nouns or infinitive verbs suggestion though. What's the thinking there? Also to be clear, are you advocating for no adjectives/adverbs, or are you just restricting which nouns/verbs are allowed and allowing other types of word to be unrestricted?
The reason for the restriction is that you make a near endless amount of words by allowing plural, past, future, genitive (at least in Danish, that doesn't take apostrophe in the genitive) et cetera. I'm unsure how I would restrict adjectives/adverbs, but the idea is that the words should exist as main entries in a dictionary.
Here's where I come from:
Decades ago I learned to play a word game which was more like MasterMind than Wordle, and it could be played with just pen and paper (later I have played it over sms, and over gratis bank transfers):
Each participant writes down a secret 5-letter word (unique letters, singular nouns, no verbs) and take turns to guess the oppponent's word. The only clue you get for each guess, is how many correct letters your guess has. You do not get to know which letters are correct, if any, nor if they are correctly placed. It's a bit more challenging than Wordle, something that justifies the restrictions, but even with Wordle I think it's reasonable to use just the “root dictionary words”, if I may call them so.
The different forms of the word are really just a constant factor. Moreover, not all endings have the same number of letters, so it's easy to distinguish between e.g. eat vs eaten vs ate.
The former is translated from Swedish by its author and I have promised to help the author make it look like fluent Danish, but I haven't gotten around to it just yet.
The thinking is probably that if you allow plurals and certain other verb forms to any significant degree you probably end up with a disproportionate number of trailing "S" letters--which would be less interesting.
The combination of five letters, the rules, and the number of guesses seem to calibrate the difficulty pretty well for me. Given enough time, I could probably solve most words eventually with just my brain. (In practice, I sometimes go to a dictionary program that's not wordle specific to tickle my brain once I know what I'm probably looking for.
> The thinking is probably that if you allow plurals and certain other verb forms to any significant degree you probably end up with a disproportionate number of trailing "S" letters--which would be less interesting.
There's no reason it has to be noticeably disproportionate, the clues are curated and not just picked randomly from the list of words that are legal to guess.
I guess I'm also curious if the suggestion is that all these words are illegal to guess or just not used as clues?
It appears as if there are plurals in the words you can use to guess. I just tried PILLS and it worked. I have not yet run across a plural as the answer but I haven't looked at the word list.
It would be better if it just represented replies as ASCII chars to avoid perl postprocessing. Most terminals probably doesn't display colored emoji anyway.
Interestingly I just tried it on Windows. For me Windows Terminal managed emoji, but only the green square! (After running “chcp 65001”)
However the unescaping isn’t needed, nslookup on Windows just outputs the raw data. Makes me wonder if I could just use ANSI terminal escape sequences.
Here's an emoji-less version that prints correctly-placed characters in uppercase, incorrectly-placed characters in lowercase, and incorrect characters as spaces. Gotta love bitmask tricks.
I'd guess Cricket's book(s) published by O'Reilly can guide you deep enough. Of course, developments since their publication are not covered, but you can still learn a lot.