1. 55
  1. 17

    (I think this is on-topic because it’s using Unix, it’s problem-solving with computers, and it’s statistical analysis and cryptanalysis, so I’m not avoiding Wordle on Lobste.rs).

    Note that the letter distributions for Wordle are quite different from those I see in /usr/share/dict/words; in particular S drops in frequency enough to skew the results significantly. It looks as though Wordle drops all plurals which end S, such that of the 36 remaining ????S words, 21 end SS and 12 end US.

    curl -Lo wordle_words.crlf https://github.com/AllValley/WordleDictionary/raw/main/wordle_solutions_alphabetized.txt
    tr -d $'\r' < wordle_words.crlf > wordle_words
    rm wordle_words.crlf
    LC_COLLATE=C grep -E '^[a-z]{5}$' /usr/share/dict/words > latin_words
    grep -E '^[[:lower:]]{5}$' /usr/share/dict/words | recode -f utf8..flat > normalized_words
    LC_COLLATE=C grep -E '^[a-z]+$' /usr/share/dict/words > latin_all

    Then, using zsh syntax (I can’t be bothered to rewrite the array expansions to be bash-compatible):

    WL=(latin_all normalized_words latin_words wordle_words)
     # Letter occurs counts:
    for F in $WL; do
      { echo "= $F"; for L in {a..z}; do echo "$(grep -c $L $F) $L"; done | sort -nr } >t.$F
    done; paste t.$WL | column -t; rm t.$WL
     # Total counts of letters, including repeated letters:
    for F in $WL; do
      { echo "= $F"; for L in {a..z}; do echo "$(fold -bw 1 < $F | grep -c $L) $L"; done | sort -nr } >t.$F
    done; paste t.$WL | column -t; rm t.$WL
     # Letters repeated the most:
    for F in $WL; do
      { echo "= $F"; for L in {a..z}; do present=$(grep -c $L $F); total=$(fold -bw 1 < $F | grep -c $L);
        echo "$((total - present)) $L" ; done | sort -nr } > t.$F
    done; paste t.$WL | column -t ; rm t.$WL

    That should get you three tables of the letter distributions, across four dictionaries each. The first is “counts of words containing that letter”. The second is “counts of that letter” The third is “difference between the two prior counts”.

    1. 7

      I had more fun coding up something for Wordle than I did trying to play it.

      1. 1

        Let us now solve the Wordle for Sat, 22 Jan 2022 …:

        $ grep -P '^(?=[a-z]{5})[^aros]{4}e$' /usr/share/dict/words | head -n 5
        $ grep -P '^(?=.*i.*)(?=[a-z]{5})[^arosbeg]{2}[^arosbegi][^arosbeg]e$' /usr/share/dict/words | head -n 5
        $ grep -P '^(?=.*c.*)(?=[a-z]{5})[^arosbegfh]i[^arosbegfchi][^arosbegfh]e$' /usr/share/dict/words
        $ grep -P '^(?=[a-z]{5})[^arosbegfhm]ince$' /usr/share/dict/words
        1. -1

          For weeks I’ve been avoiding Twitter (and hence spending more time reading articles from Lobste.rs) because of the flood of Wordle garble that took over my timeline. Thank you, thank you for bringing that scourge here too. Now excuse my while I turn off the electricity and hide under a tinfoil blanket…

          1. 31

            If it’s bothering you, you should use the Twitter mute words feature to filter the words [wordl, wordle] from your timeline. It’s actually fairly competent at doing it given the sharing mechanic is identical for all.

            1. 27

              what’s wrong with wordle? It’s a tiny, free game made by one guy. It’s totally harmless.

              1. 5

                it’s noise

                1. 18

                  No. The word was “wince.” Stop trying to spoil it for others. :)

                  1. 29

                    Of all the things advertised and hyped on the internet, please explain how a small web app with no ads, no accounts, which is straight-up fun and tickles your brain cells is “noise”?

                    1. 3

                      If you have absolutely zero interest in it, yet seemingly everyone’s posting about it and it becomes unavoidable wherever you go online, it becomes noise.

                      1. 5

                        It must be very annoying to browse the web then, because by that definition almost everything is noise.

                        1. 1

                          Only when [something you have zero interest in, but also zero possibility of filter/blocking] gets posted in all your social places. Over and over again.

                      2. 3

                        The tweets are a bunch of gray/yellow/green squares. They are perhaps less annoying than ads, but if enough of the accounts you follow tweet about their wordle progress daily, it can overtake your timeline with meaningless squares. The game itself is harmless, but the social media trend can be irritating.

                        1. 5

                          Twitter is so much more enjoyable when you start blocking. In this case blocking the word “wordle” should suffice.