1. 36

Here’s a little wordle clone I wrote using words from the POSIX API and command-line as its dictionary. This was an exercise in just writing a straight-forward client-side web app. It’s a single HTML file that comes over the wire at about 3.8k. This is without even stripping comments from the source.

  1. 6

    Nice! One note, though, is that in its current form it doesn’t match the standard rules of Mastermind scoring (which Wordle also follows) – specifically the requirement that each element can only match once. Thus for example if the answer is chdir and I guess cacos, then the first “c” should be marked green, but the second “c” must go unmarked. (On the other hand, if the answer is rmdir and I guess errno, then both “r”s should be marked yellow.)

    1. 2

      Yeah I think I failed the first challenge because of this… I got pretty close but I thought there were 2 e’s because of the way it’s scored. But there is only 1 e.

      1. 1

        Okay, thanks, now I don’t have to comment about failing because two e’s.

        1. 2

          I did have a TODO in the code, but I’ve finally fixed it. Sorry!

    2. 5

      I enjoyed this, thanks! And got massively lucky:

      Wordlix 🟩🟩🟩🟩🟩

      Time to buy a lottery ticket now

      1. 4

        That was fun and a lot harder than I expected. It’s tricky having such a limited dictionary, thanks for sharing!

        1. 3

          Frustratingly fun >:| Thanks!

          Succeeded in the last attempt, but got a “Better luck next time” message.

          1. 1

            Yeah I had the same happen to me

            1. 1

              Oh noes. I just fixed that.

          2. 2

            I must say, this game has taught me that POSIX defines a surprising number of higher math functions.

            1. 1

              I loved it. However the share didn’t seem to work. I tried to share to clipboard on Firefox Android and just got:

              Wordlix - 

              Worse when I went back j didn’t have the option to try again!

              1. 1

                I just reproed that. Firefox Android seems to have a weird navigator.share implementation.

                1. 1

                  Ugh, it looks like Firefox on Android exposes a navigator.share property but it doesn’t actually work: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share#browser_compatibility

                  I have no interest in implementing any browser-specific hacks in this little project. I test for the feature and fall back to the clipboard. Hopefully Mozilla will fix this in the browser some day.

                  1. 1

                    Strange. It seems to lsrtly work but I guess not fully?

                    Going to about:config and setting dom.webshare.enabled=false is enough to trigger your fallback. I guess we can’t expect you to do anything more.

                2. 1





                  1. 1